Complete

Completes a checkout process and creates the order

Endpoint Details

POST /checkout/complete

Headers

Header
Value

Content-Type

application/json

Authorization

Bearer <YOUR_ACCESS_TOKEN>

Body

Parameter
Type
Description
Required

token

string

Checkout token from prepare endpoint

payment

string

Payment method ID or new payment token, you must use the CLOUD SDK to mount/inject a paymentElement to be able to generate a payment token.

Response Details

Field
Type
Description

statusCode

number

Internal status code of the response

message

string

A brief message describing the result of the API call

metadata

Contains metadata about the API call

auth

Authentication object, only when refresh in true

order.number

string

Order number

order.referenceId

string

Order reference id

Metadata Object

Field
Type
Description

languages

Array<string>

List of supported languages for the response, e.g. ["en"]

timestamp

string

Unix timestamp (in milliseconds) when the response was generated

timezone

string

Timezone used for the response, always "UTC"

requestId

string

Unique identifier for the API request. Used for debugging and support

path

string

API path

version

string

API version used for the request

Sample Request and Response

curl --location 'https://staging.api.liquidcommerce.cloud/checkout/complete' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN'> \
--header 'Content-Type: application/json' \
--data-raw '{
    "token": "preparetoken_123abc456def",
    "payment": "paymentid_123abc456def"
}'
{
    "statusCode": 200,
    "message": "Processed your checkout and successfully charged the shopper.",
    "metadata": {
        "languages": [
            "en"
        ],
        "timestamp": 1731629320062,
        "timezone": "UTC",
        "requestId": "requestid_123abc456def",
        "path": "/api/checkout/complete",
        "version": "1.7.0"
    },
    "order": {
        "number": "ordernumber_1737134234213"
        "referenceId": "referenceid_123abc456def"
    }
}

Last updated