POST
/
v2
/
checkout
curl --request POST \
  --url https://prod.checkout.fabric.inc/v2/checkout \
  --header 'Content-Type: application/json' \
  --header 'x-site-context: <x-site-context>' \
  --data '{
  "cartId": "d7e78a21-bee3-4448-bf1c-d5b5461dbda2",
  "customerAccountId": "5f689caa4216e7000750d1ef",
  "customerName": {
    "first": "John",
    "middle": "Mae",
    "last": "Doe"
  },
  "customerEmail": "john.doe@gmail.com",
  "customerPhoneNumber": {
    "number": "123-456-7890",
    "kind": "office"
  },
  "paymentDetails": [
    {
      "connectorName": "Authorizenet",
      "paymentMethod": "card",
      "paymentMethodType": "tamara, tabby",
      "paymentToken": 534234543,
      "amount": 100,
      "currency": "USD",
      "conversion": 1.1,
      "billToAddress": {
        "name": {
          "first": "John",
          "middle": "Mae",
          "last": "Doe"
        },
        "phone": {
          "number": "123-456-7890",
          "kind": "office"
        },
        "email": "john.doe@gmail.com",
        "street1": "100 NE 100th St",
        "street2": "Near landmark",
        "street3": "Near landmark",
        "street4": "Near landmark",
        "city": "Seattle",
        "state": "Washington",
        "country": "USA",
        "zipCode": 98121,
        "customerId": 98121,
        "type": "residence",
        "latitude": 32.294952,
        "longitude": 32.294952
      },
      "attributes": {
        "Attribute1": "Attribute1 Value"
      }
    }
  ],
  "estimatedTax": {
    "itemsTaxes": [
      {
        "lineItemId": 1,
        "amount": 1.5,
        "type": "state tax"
      }
    ],
    "shipToTaxes": [
      {
        "shipToId": "fef78121-bee3-4448-bf1c-d5b5461dbda2",
        "amount": 2.5,
        "type": "state tax"
      }
    ]
  },
  "shipFrom": {
    "street": "100 NE 100th St",
    "city": "Seattle",
    "state": "Washington",
    "country": "USA",
    "zipCode": 98121
  },
  "orderType": "WEB",
  "orderSubType": "Android",
  "orderSequence": {
    "sequenceName": "ORDER_SEQUENCE_NAME",
    "sequenceKey": "WHBM"
  },
  "employeeId": 43278,
  "notes": [
    {
      "timestamp": "2022-05-12T09:30:31.198Z",
      "user": "62272e917b12209e68751d94",
      "notes": "Type Anything"
    }
  ]
}'
{
  "checkoutComplete": true,
  "orderId": "111-121-1234"
}

Headers

x-site-context
string
required

The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.

Example:

"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"

Authorization
string | null

Authorization token for the user

Example:

"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4"

Body

application/json

Checkout request payload

Response

200
application/json
OK

Checkout response details