You can update a clients session created earlier with the PATCH /client-session API call.
The only required field for the request is clientToken. Other supported request fields are same as for the POST /client-session API call.
You need to specify only the fields you wish to update. However, if the items to be updated are arrays (e.g.lineItems), you need to provide the entire array, including any new or modified items. Primer will replace the full array with whatever is sent in the request. If you want to keep existing items, make sure to include them in your request, anything omitted will be removed.
If you wish to update nested fields on the client session, such as the customer emailAddress field, you can pass the customer object with only one field, emailAddress, to update.
If you simply wish to clear the value of the field, pass null as your input.
You can update paymentMethod.vaultOnSuccess field but updating of the paymentMethod.options field through PATCH /client-session is not supported.
The response will contain all the fields of the client session including the ones that were changed.
Specifies the version of the API to use. This must be set to 2.4.
"2.4"
Client token for use in the Primer-JS SDK obtained via POST /client-session API call.
A unique identifier for your customer.
Your reference for the order.
The 3-letter currency code in ISO 4217 format. e.g. use USD for US dollars.
The amount you would like to charge the customer, in minor units. e.g. for $7, use 700.
Some currencies, such as Japanese Yen, do not have minor units. In this case you should use the value as it is, without any formatting. For example for ¥100, use 100.
If the amount is provided on this level, it would override any amount calculated from the provided line items, shipping and other amounts.
x >= 0Additional data to be used throughout the payment lifecycle.
Provide the entire object to update it. Anything provided previously will be overwritten.
More information associated with the customer.
Each of the fields in this object must be updated in its entirety, i.e. provide the entire object to update it. Anything provided previously will be overwritten.
More information associated with the order.
Each of the fields in this object must be updated in its entirety, i.e. provide the entire object to update it. Anything provided previously will be overwritten.
Enable certain options associated with the payment method. Provide the entire object to update it. Anything provided previously will be overwritten.
Successful Response
A unique identifier for your customer.
256Your reference for the payment.
256The 3-letter currency code in ISO 4217 format. e.g. use USD for US dollars.
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYR, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SOS, SRD, SSP, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XFU, XOF, XPD, XPF, XPT, XSU, XTS, XUA, YER, ZAR, ZMW, ZWL The amount you are going to charge the customer, in minor units. This amount is calculated from the line items, shipping and other amounts provided in the order.
If a top-level amount is provided, it would override any calculated amount.
x >= 0Additional data to be used throughout the payment lifecycle.
More information associated with the customer.
More information associated with the order.
Enable certain options associated with the payment methods.