Skip to main content
POST
/
cart
/
checkout
cURL
curl --request POST \
  --url https://development.knotapi.com/cart/checkout \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "external_user_id": "abc123",
  "merchant_id": 46,
  "payment_method": {
    "id": "81n9al10a0ayn13",
    "jwe": "eyJhbGciOiJSU0EtT0FFUC0yNTYiLC...",
    "user": "eyJhbGciOiJSU0EtT0FFUC0yNTYiLC...",
    "card": "eyJhbGciOiJSU0EtT0FFUC0yNTYiLC...",
    "is_single_use": true
  },
  "simulate": "failed"
}'
{
"message": "Success"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password. Use your client_id as the username and your secret as the password value.

Body

application/json

The input parameters required to checkout a cart.

external_user_id
string
required

Your unique identifier for the user.

Example:

"abc123"

merchant_id
integer
required

Unique identifier for the merchant.

Example:

46

payment_method
object
simulate
enum<string>

Simulate a failure in the development environment. The checkout attempt fails.

Available options:
failed
Example:

"failed"

Response

Successful request.

message
string

Success message.

Example:

"Success"

I