Skip to main content

Update session (Hosted Payment Fields)

PUT 

/api/v1/session/update

Server-to-server request that changes parameters of an active Hosted Payment Fields session, for example when the payer switches between a one-time payment and an installment plan.

The session token and its expiration time stay the same, and the card details the payer has already entered remain in the hosted fields. You do not need to call hostedFields.init() again.

Authenticate the request with the session token in the Token header. Do not send merchant_key or hash: they are rejected like any other parameter not listed in the body schema.

Send only the parameters you want to change. Parameters you do not send keep their current values.

When you change order_amount or order_currency, the whole session is checked again and the available payment methods are selected again. If no payment method is available, the request fails with the error Not found acceptable methods.

Once a payment is created for the session, even if it is declined, the session can no longer be updated and the request returns the error Session can not be updated.

Request​

Responses​

Session updated