Skip to main content
POST
Completes cart checkout

Authorizations

Authorization
string
header
required

Bearer token authentication

Path Parameters

cart_token
string
required

Body

application/json

Optional. Other submit-time fields (fraud session, device data, browser info) are accepted as well. Send accepted_agreement_ids whenever the cart has a required agreement, and always send the expected_total / expected_currency pair.

accepted_agreement_ids
integer[]

Ids of the agreements the shopper accepted, from the cart's agreements array. Required whenever the cart has a required agreement: checkout refuses with 422 and errors.agreements when any agreement the cart marks required is missing from this list, unless the cart's payment is already authorized or captured.

Example:
accepted_agreement_versions
object[]

The version of each accepted agreement's text the client showed the shopper: the agreement's id with the content_digest from the same entry of the cart's agreements array. Optional. When present, checkout refuses with 422 and errors.agreements if any named version is no longer the agreement's live text, so the shopper is shown the new wording before being charged.

Example:
expected_total
string

The cart total the client showed the shopper, as a decimal string in the cart currency's major unit ("141.74"), taken from amount_total of the cart the client last rendered. Requires expected_currency.

Pattern: ^\d{1,12}(\.\d{1,5})?$
Example:

"141.74"

expected_currency
string

ISO 4217 code of the currency the shopper was shown. Requires expected_total.

Example:

"USD"

phone
string

Phone number to save on the cart before the checkout runs, for a company whose checkout settings require one. Intended for a cart that cannot take a PATCH: once a wallet payment is approved the cart is authorized and every cart mutation answers 410, so a shopper finishing such a cart supplies the number here instead. Ignored on an already-completed cart. A number that is still not dialable leaves the checkout refused with phone in errors.

Example:

"+12125551005"

Response

object | null

Success

order
object · null · null
meta
object · null · null