POST /commerce/{accountId}/v2/checkouts

Creates a checkout session from a basket, leading to a payment intent based on the provided gateway.

Path parameters

  • accountId string Required

    Default value is 668e4aa170efd23c474b2ad1.

application/json

Body

  • basket object Required
    Hide basket attribute Show basket attribute object
    • id string Required
  • note string
  • payments array[object] Required
    Hide payments attributes Show payments attributes object
    • type string Required

      Values are dpay, third_party, or gift_card. Default value is dpay.

    • externalId string Required

      id of the payment provider

      Default value is empty.

    • isPrepaid boolean Required

      indicates whether the order has been paid. For Dpay it should be true.

      Default value is true.

    • amount integer Required

      total amount paid with 2 decimal digits. 800 would correspond to 8 in local currency

      Default value is empty.

    • metadata object
  • order object
    Hide order attributes Show order attributes object
    • channelOrderId string

      The full unique ID from the ordering channel, cannot be reused within 48hr after pickup (across all accounts)

    • channelOrderDisplayId string

      A more human‑readable order reference to provide, usually shorter than the channelOrderId

Responses

  • 200 application/json

    200

    Hide response attributes Show response attributes object
    • id string
    • created string
    • updated string
    • deleted boolean

      Default value is true.

    • etag string
    • accountId string
    • storeId string
    • status string
    • basket object
      Hide basket attributes Show basket attributes object
      • currency string
      • taxExclusive boolean

        Default value is true.

      • items array[object]
        Hide items attributes Show items attributes object
        • menuId string
        • plu string
        • name string
        • quantity integer

          Default value is 0.

        • price integer

          Default value is 0.

        • gross integer

          Default value is 0.

        • taxes array
        • net integer

          Default value is 0.

        • subItems array
        • discounts array
        • discountTotal integer

          Default value is 0.

      • payment object
        Hide payment attributes Show payment attributes object
        • tips array[object]
          Hide tips attributes Show tips attributes object
          • amount integer

            Default value is 0.

          • type string
        • discountsTotal integer

          Default value is 0.

        • taxTotal integer

          Default value is 0.

        • tipTotal integer

          Default value is 0.

        • total integer

          Default value is 0.

      • customer object
        Hide customer attributes Show customer attributes object
        • name string
        • companyName string
        • phoneNumber string
        • email string
        • tin string
      • fulfillment object
        Hide fulfillment attribute Show fulfillment attribute object
        • type string

          Values are pickup, delivery, or dispatch.

      • taxes array
      • discounts array
    • payments array[object]
      Hide payments attributes Show payments attributes object
      • id string
      • type string

        Values are dpay, third_party, or gift_card.

      • isPrepaid boolean

        Values are true or false.

      • amount string
      • status string
    • order object
      Hide order attributes Show order attributes object
      • channelOrderId string
      • channelOrderDisplayId string
  • 422 application/json

    422

    Hide response attributes Show response attributes object
    • code string Required

      Default value is empty.

    • message string

      Default value is empty.

    • context object
      Hide context attributes Show context attributes object
      • paymentsTotal integer

        Default value is empty.

      • basketTotal integer

        Default value is empty.

POST /commerce/{accountId}/v2/checkouts
curl \
 --request POST 'https://api.staging.deliverect.com/commerce/{accountId}/v2/checkouts' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"basket":{"id":"string"},"note":"string","payments":[{"type":"dpay","externalId":"","isPrepaid":"true","amount":"","metadata":{}}],"order":{"channelOrderId":"string","channelOrderDisplayId":"string"}}'
Request examples
{
  "basket": {
    "id": "string"
  },
  "note": "string",
  "payments": [
    {
      "type": "dpay",
      "externalId": "",
      "isPrepaid": "true",
      "amount": "",
      "metadata": {}
    }
  ],
  "order": {
    "channelOrderId": "string",
    "channelOrderDisplayId": "string"
  }
}
Response examples (200)
{
  "id": "694138133662b46bddf06e70",
  "etag": "2e94b59d6155094830af3362502fddc0cd51ef2f",
  "order": {
    "status": null,
    "channelOrderId": "5f6fb9fa-71ad-4758-8118-b9966d950105",
    "channelOrderDisplayId": "5f6fb9fa"
  },
  "basket": {
    "id": "694138103662b46bddf06e6e",
    "items": [
      {
        "id": "694138103662b46bddf06e6f",
        "net": 1500,
        "plu": "STK-01",
        "name": "Delicious Steak Frites",
        "note": "ITEM LEVEL NOTE",
        "gross": 1500,
        "price": 1500,
        "taxes": [],
        "menuId": "6882366cf04ece702e6661c8",
        "quantity": 1,
        "subItems": [
          {
            "plu": "COOK-01",
            "name": "Rare",
            "note": null,
            "price": 0,
            "quantity": 1,
            "subItems": [],
            "customizationPlu": "MOD-01"
          },
          {
            "plu": "SI-01",
            "name": "Fries",
            "note": null,
            "price": 0,
            "quantity": 1,
            "subItems": [],
            "customizationPlu": "MOD-02"
          }
        ],
        "discounts": [],
        "discountTotal": 0
      }
    ],
    "taxes": [],
    "status": "open",
    "channel": 10165,
    "charges": {
      "bagFee": {
        "net": 0,
        "tax": 0,
        "gross": 0,
        "value": 0,
        "taxRate": 0
      },
      "netTotal": 0,
      "taxTotal": 0,
      "grossTotal": 0,
      "deliveryFee": {
        "net": 0,
        "tax": 0,
        "gross": 0,
        "value": 0,
        "taxRate": 0
      },
      "serviceCharge": {
        "net": 0,
        "tax": 0,
        "type": "fixed",
        "gross": 0,
        "value": 0,
        "taxRate": 0
      }
    },
    "payment": {
      "tips": [],
      "total": 1500,
      "subTotal": 1500,
      "taxTotal": 0,
      "tipTotal": 0,
      "chargesTotal": 0,
      "discountsTotal": 0
    },
    "category": {
      "type": "restaurant"
    },
    "currency": "AED",
    "customer": {
      "tin": null,
      "name": "John Doe",
      "email": "john.doe@acme.com",
      "externalId": "custom_channel_id_12345",
      "companyName": "ACME",
      "phoneNumber": "+32474081356",
      "loyaltyProviderCustomerId": null
    },
    "discounts": [],
    "fulfillment": {
      "spot": "TABLE-1",
      "type": "eatIn"
    },
    "taxExclusive": false
  },
  "status": "open",
  "created": "2025-12-16T10:44:35.107000",
  "deleted": false,
  "payment": {
    "id": "694138133662b46bddf06e71",
    "action": {
      "paid": true,
      "type": "offline"
    },
    "status": "authorized",
    "gateway": 1,
    "metadata": {}
  },
  "storeId": "6911e9be1531637e9cf80a5f",
  "updated": "2025-12-16T10:44:51.016000+00:00",
  "accountId": "668cd58b6da5e4cec26f1f35",
  "channelLinkId": "6911e9be1531637e9cf80a5f",
  "failureReason": null
}
{
  "id": "6643861d0c1914c93a846b78",
  "etag": "f225b232489659ed4dc0f17580f4f0200f4ca3ba",
  "order": null,
  "basket": {
    "items": [
      {
        "net": 1500,
        "plu": "STK-01",
        "name": "Delicious Steak Frites",
        "gross": 1500,
        "price": 1500,
        "taxes": [],
        "menuId": "62d7f77f64c95193cc29aa91",
        "quantity": 1,
        "subItems": [],
        "discounts": [],
        "discountTotal": 0
      }
    ],
    "taxes": [],
    "payment": {
      "tips": [
        {
          "type": "restaurant",
          "amount": 100
        }
      ],
      "total": 1600,
      "taxTotal": 0,
      "tipTotal": 100,
      "discountsTotal": 0
    },
    "currency": "EUR",
    "customer": {
      "tin": "123456789",
      "name": "John Doe",
      "email": "john.doe@acme.com",
      "companyName": "ACME",
      "phoneNumber": "+3211223344"
    },
    "discounts": [],
    "fulfillment": {
      "type": "pickup"
    },
    "taxExclusive": false
  },
  "status": "open",
  "created": "2024-05-14T15:41:17.518000+00:00",
  "deleted": false,
  "payment": {
    "id": "62d7f77f64c95193cc29aa91",
    "action": {
      "url": "http://payment.acme.com/1234",
      "type": "redirect"
    },
    "status": "pending"
  },
  "storeId": "65eee6a9984a1bc1b9637c59",
  "updated": "2024-05-14T15:41:18.449000+00:00",
  "accountId": "65c35d109a19b819b7cf78d8",
  "channelLinkId": "65eee6a9984a1bc1b9637c59"
}
Response examples (422)
{
  "code": "payment_amount_mismatch",
  "context": {
    "basketTotal": 854,
    "paymentsTotal": 856
  },
  "message": "Total of payments does not match basket payment total"
}