PATCH
/
client-session
Update client session
curl --request PATCH \
  --url https://api.sandbox.primer.io/client-session \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-API-VERSION: <x-api-version>' \
  --data '{
  "clientToken": "client-session-token",
  "customerId": "customer-123",
  "orderId": "order-abc",
  "customer": {
    "emailAddress": "john@primer.io"
  },
  "amount": 500,
  "paymentMethod": {
    "authorizationType": "FINAL"
  },
  "order": {
    "lineItems": [
      {
        "itemId": "shoe-123",
        "description": "Blue Shoe",
        "amount": 100,
        "quantity": 10
      }
    ],
    "countryCode": "FR"
  }
}'
{
"customerId": "customer-123",
"orderId": "order-abc",
"currencyCode": "GBP",
"amount": 650,
"metadata": {
"productType": "Clothing"
},
"customer": {
"emailAddress": "john@primer.io"
},
"order": {
"lineItems": [
{
"itemId": "t-shirt-1",
"description": "White T-Shirt",
"amount": 500,
"quantity": 1
}
],
"fees": [
{
"type": "SURCHARGE",
"amount": 100
}
],
"shipping": {
"amount": 50
},
"paymentMethod": {
"vaultOnSuccess": false,
"vaultOn3DS": false,
"options": {
"GOOGLE_PAY": {
"surcharge": {
"amount": 100
}
},
"PAYMENT_CARD": {
"networks": {
"VISA": {
"surcharge": {
"amount": 10
}
},
"MASTERCARD": {
"surcharge": {
"amount": 20
}
}
}
},
"PAY_NL_IDEAL": {
"surcharge": {
"amount": 50
}
}
}
},
"authorizationType": "ESTIMATED"
}
}

Authorizations

X-API-KEY
string
header
required

Headers

X-API-VERSION
string
required

Specifies the version of the API to use. This must be set to 2.4.

Example:

"2.4"

Body

application/json

Response

200
application/json

Successful Response

The response is of type object.