Raw schema
{
"type": "object",
"properties": {
"guest_token": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "Private guest session token from create_cart. Retain for cart, checkout and purchase-status calls; no account login needed."
},
"account_token": {
"type": "string",
"pattern": "^tak_[a-f0-9]{64}$",
"description": "Private account token from sign_in, after the customer gave you the code from their email. Lets quotes and checkout use their cashback credit, and opens their orders."
},
"use_credit": {
"type": "boolean",
"description": "Use the signed-in customer's cashback credit (default true)."
},
"coupon_code": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64
},
{
"type": "null"
}
],
"description": "A coupon code or a friend's referral code to apply; null removes both. quote_cart previews it; create_checkout applies it."
},
"cart_id": {
"type": "string",
"format": "uuid",
"description": "cart_id from create_cart."
},
"version": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "The version from the quote_cart result you are checking out."
},
"expected_total": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "The total from that quote, in SGD cents. Checkout refuses if the total changed."
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "A new random key per purchase. Retry with the same key and exact input; never reuse it for a different purchase."
},
"details": {
"type": "object",
"properties": {
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"email": {
"type": "string",
"minLength": 1,
"maxLength": 254
},
"phone": {
"type": "string",
"minLength": 1,
"maxLength": 32
}
},
"required": [
"name",
"email",
"phone"
],
"additionalProperties": false
},
"delivery": {
"type": "object",
"properties": {
"recipient_name": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"recipient_phone": {
"type": "string",
"minLength": 1,
"maxLength": 32
},
"address_line1": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"address_line2": {
"type": "string",
"maxLength": 200
},
"unit_number": {
"type": "string",
"maxLength": 30,
"description": "e.g. #12-34. Required unless no_unit_number is true."
},
"no_unit_number": {
"type": "boolean",
"description": "true for a landed house or other address with no unit number."
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"postal_code": {
"type": "string",
"minLength": 1,
"maxLength": 6,
"description": "The 6-digit Singapore postal code."
},
"country": {
"type": "string",
"const": "SG"
}
},
"required": [
"recipient_name",
"recipient_phone",
"address_line1",
"no_unit_number",
"postal_code",
"country"
],
"additionalProperties": false
}
},
"required": [
"contact",
"delivery"
],
"additionalProperties": false,
"description": "Optional: the buyer's contact and Singapore delivery details, saved with the checkout (details_version 1) instead of a separate set_checkout_details call. The buyer still confirms them and the total before prepare_payment."
}
},
"required": [
"cart_id",
"version",
"expected_total",
"idempotency_key"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}