Skip to navigation

Update a checkout

Replaces the cart and prices it again. Send the version last read; a stale one answers 409 and changes nothing, so read the checkout and send the write again at its version. A cart the purchase rules reject is saved with its price cleared and one problem saying why, and the version still advances. The X-Checkout-Session-ID response header names the session this price belongs to; send it back on the finalize that follows.

Authentication

X-Schematic-Api-Keystring

A temporary access token in the X-Schematic-Api-Key header. Your server mints it with POST /temporary-access-tokens on the secret-key API for a company, optionally for one of its users, and hands it to the page. The token fixes the company every request reads and writes.

Path parameters

checkout_idstringRequired

checkout_id

Request

This endpoint expects an object.
versionlongRequired
add_on_idslist of objectsOptional
auto_topup_overrideslist of objectsOptional
billing_entity_idstring or nullOptional
coupon_external_idstring or nullOptional<=255 characters
credit_bundleslist of objectsOptional
currencyenum or nullOptional

ISO 4217 currency this cart is being built in. Prices are still selected by id; this records the intent, and a cart that prices in another currency is reported as a problem.

custom_field_valueslist of objectsOptional
intentenum or nullOptional

What the checkout does to the subscription: change it to the cart’s contents, or cancel it. Omit it to keep the checkout’s current intent.

Allowed values:
new_plan_idstringOptional
new_price_idstringOptional
opt_in_acceptedboolean or nullOptional
pay_in_advancelist of objectsOptional
payment_method_idstring or nullOptional<=255 characters
promo_codestring or nullOptional<=255 characters
skip_trialbooleanOptional

Response headers

X-Checkout-Session-IDstringOptional
The checkout session this price belongs to. Send it back on the purchase that follows.

Response

OK
dataobject
paramsobject
Input parameters

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error