POST
/
checkout
/
sessions
curl --request POST \
  --url https://api.fabric.inc/v3/checkout/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
  --data '{
  "cartId": "d7e78a21-bee3-4448-bf1c-d5b5461dbda2",
  "customer": {
    "name": {
      "firstName": "Pat",
      "middleName": "E",
      "lastName": "Kake"
    },
    "email": "test@example.com",
    "phone": {
      "number": "5555555555",
      "type": "MOBILE"
    },
    "userId": "62272e917b12209e68751d94",
    "accountId": "62272e917b12209e68751d94",
    "employeeId": "62272e917b12209e68751d94",
    "company": "fabric"
  },
  "payments": [
    {
      "paymentProvider": "authorize.net",
      "paymentMethod": "card",
      "paymentToken": {
        "token": "pi_34tr6787rt",
        "paymentType": "VISA"
      },
      "amount": 150.25,
      "currency": "USD",
      "billingAddress": {
        "addressLine1": "123 Main St.",
        "addressLine2": "Suite 100",
        "addressLine3": "Seventh floor",
        "addressLine4": "Attention: Pat E. Kake",
        "city": "Seattle",
        "region": "WA",
        "postalCode": "98121",
        "country": "US",
        "name": {
          "firstName": "Pat",
          "middleName": "E",
          "lastName": "Kake"
        },
        "phone": {
          "number": "123-456-7890",
          "type": "office"
        },
        "email": "user@example.com",
        "customerId": "62cffd65e8d7eb868c6a29d6",
        "type": "residence",
        "latitude": 47.6205,
        "longitude": -122.3493
      },
      "attributes": {
        "paymentId": "620d8896058edb0009385311"
      }
    }
  ],
  "tax": {
    "itemTaxes": [
      {
        "lineItemId": "d7e78a21-bee3-4448-bf1c-d5b5461dbda2",
        "position": 1,
        "amount": 150.25,
        "currency": "USD",
        "name": "state tax",
        "rateType": "PERCENTAGE",
        "rate": 10
      }
    ],
    "shippingTaxes": [
      {
        "shippingDetailsId": "fef78121-bee3-4448-bf1c-d5b5461dbda2",
        "amount": 150.25,
        "currency": "USD",
        "name": "state tax"
      }
    ],
    "feeTaxes": [
      {
        "feeId": "fef78121-bee3-4448-bf1c-d5b5461dbda2",
        "name": "State tax",
        "amount": 150.25,
        "currency": "USD"
      }
    ]
  },
  "orderMetadata": {
    "orderType": "MOBILE_APP",
    "orderSubtype": "Android",
    "notes": [
      {
        "notedAt": "2022-09-06T14:07:17.000Z",
        "user": "261AF48",
        "notes": "Additional notes..."
      }
    ]
  }
}'
{
  "state": "COMPLETED",
  "orderId": "111-121-1234"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-fabric-tenant-id
string
required

Merchant's 24-character tenant ID

x-fabric-channel-id
string

Sales channel ID

x-fabric-request-id
string

Unique request ID

Body

application/json
cartId
string
required

Unique cart ID

customer
object

Customer making payment

payments
object[]
required

Payment detail list

tax
object
required

Estimated taxes for items, shipping and fees

orderMetadata
object

Additional order information

Response

200 - application/json
state
enum<string>

Checkout session state.<br />COMPLETED: Checkout is complete<br />PENDING: Checkout is incomplete

Available options:
COMPLETED,
PENDING
orderId
string | null

Order ID