Checkout Basket

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Create a checkout session for an open basket, specifying the payment method(s), dispatch options and other details relevant for POS order injection.

Request Parameters

▶ See Checkout Model

Order Object

The order object includes key details as described below;

"order": {
  "channelOrderId": "TEST****629",
  "channelOrderDisplayId": "T**629",
  "by": "Mobile App",
  "courier": "restaurant"
}
ParametersMeaningType
channelOrderIdYour channel's unique ID for this order. Deliverect uses it to reference the order in webhooks and reporting, so it must not be reused.String
channelOrderDisplayIdThe short reference displayed on the POS, kitchen tickets, and receipts. Keep it concise and human-readable.String
byThe ordering surface or client that placed the order (e.g. "Mobile App", "Web App"). Useful for reporting and support.String
courierControls delivery handling. Set "restaurant" for self-delivery, any other string (e.g. "thirdparty") for an external courier without Dispatch, or omit it and pass a validationId instead when using integrated Dispatch (see Dispatch Orders).String
validationIdUUID returned by the Dispatch Availability endpoint which helps to secure a courier and pre-validated delivery job quoteString

Payment types

There are different types of checkouts depending on the payment method used; a combination of the methods below is also possible (see Multiple payments):

TYPEDESCRIPTIONPRE-REQUISITESENUM
Deliverect Pay APIFor processing payment via our own payment API suiteDpay integrated in Deliverectdpay
Gift CardFor redeeming a gift card balance against the order, in full or in part.A gift card provider profile linked in Deliverectgift_card
Commerce Channel ManagedIf the payment process is fully managed by the commerce platform, e.g. via a direct payment gateway integration.Nonethird_party

Deliverect Pay

The dpay payment type can be used only after; the payment has been initiated through the Deliverect Pay API, a paymentId has been issued, and authorisation has been successfully confirmed.

During dpay checkout, use the "paymentId" from the payment request as the externalId as shown in the examples to the right.

For further details on requesting payments via Deliverect Pay, see the guide below;

▶ Payment API Guide

Gift Card

Using the Gift Card API to retrieve a Gift Card balance and validate if it can be applied, the type gift_card can be specified to complete the redemption of a gift card balance. Gift card payments are always "isPrepaid": true, since the value is drawn from the card at redemption.

A gift_card payment requires a metadata object with the following fields:

  • giftCardProviderProfileLinkId — the ID of the gift card provider profile link configured in Deliverect, identifying which provider integration should process the redemption.
  • giftCardNumber — the gift card number entered or scanned by the customer.
  • giftCardVerificationCode — the card's verification code (PIN/CVC), used by the provider to authorise the redemption.

The example below shows an order paid entirely with a gift card:

{
  "basket": {
    "id": "62********************3x"
  },
  "order": {
    "channelOrderId": "TEST****629",
    "channelOrderDisplayId": "T**629",
    "by": "Web App"
  },
  "note": "ORDER LEVEL NOTE",
  "payments": [
    {
      "type": "gift_card",
      "externalId": "63********************f4",
      "isPrepaid": true,
      "amount": 900,
      "metadata": {
        "giftCardProviderProfileLinkId": "67********************t8",
        "giftCardNumber": "62*************44",
        "giftCardVerificationCode": "64**32"
      }
    }
  ]
}

📘

Partial Gift Card Payment

Where a gift card balance doesn't cover the full order total, combine it with another payment type see Multiple payments.

Third party

Use the third_party type for payments handled externally e.g. via your own payment provider rather than via Deliverect Pay. Provide the corresponding transaction ID or equivalent as the externalId as a reference.

Unpaid orders

In order to send unpaid orders, set the order type to "third_party" and "isPrepaid": false.

Instrument Type

Payment type to be associated with the third-party payment in the order in "instrumentType" field.

  • CASH = "cash"
  • CARD = "card"
  • CASH ON DELIVERY = "cash_on_delivery"
  • CARD ON DELIVERY = "card_on_delivery"
  • ONLINE = "online"
  • INVOICE = "invoice"
  • OTHER = "other"

Multiple payments (split payments)

An order can be settled with a combination of payment types by adding multiple entries to the payments array. Each entry follows the same rules as it would on its own (e.g. a dpay entry still requires a confirmed paymentId, a gift_card entry still requires its metadata), and the sum of all amount values must equal the basket total.

The example below splits a 900 total across three methods: 300 charged via Deliverect Pay but not yet collected ("isPrepaid": false), 300 redeemed from a gift card, and 300 already captured by an external provider via card:

{
  "basket": {
    "id": "62********************3x"
  },
  "order": {
    "channelOrderId": "TEST****629",
    "channelOrderDisplayId": "T**629",
    "by": "Mobile App",
    "courier": "restaurant"
  },
  "note": "ORDER LEVEL NOTE",
  "payments": [
    {
      "type": "dpay",
      "externalId": "68********************4e",
      "isPrepaid": false,
      "amount": 300,
      "metadata": {}
    },
    {
      "type": "gift_card",
      "externalId": "63********************f4",
      "isPrepaid": true,
      "amount": 300,
      "metadata": {
        "giftCardProviderProfileLinkId": "67********************t8",
        "giftCardNumber": "62*************44",
        "giftCardVerificationCode": "64**32"
      }
    },
    {
      "type": "third_party",
      "externalId": "66********************h3",
      "isPrepaid": true,
      "instrumentType": "card",
      "amount": 300,
      "metadata": {}
    }
  ]
}

Dispatch Orders

For any delivery order, it is optional to leverage integrated Dispatch services by first pre-validating courier availability.

Once a courier is confirmed as available, a validationId is returned, which can be passed within the checkout stage as below and will secure the delivery job and initiate the dispatch flow;

"order": {
  "validationId": "{{uuid}}",
},

See documentation below on the 'Dispatch Availability' endpoint;

▶ Dispatch Availability

Non-Dispatch Orders

In the case where a Deliverect integrated dispatch service is not needed, no address needs provided, but a key "courier" needs specified, with any string value like below which isn't 'restaurant'.

"order": {
  "courier": "thirdparty"
},

Checkout Confirmation

Regardless of the payment type, after sending a basket checkout request, Deliverect returns a 200 OK response if the request is valid.

Order creation is handled asynchronously, and a webhook event confirming successful order creation is sent to the configured checkout update webhook URL.

⚠️

Checkout Success

Only consider a checkout successful after the basket checkout webhook URL receives "status": "completed" .


Path Params
string
required
Defaults to 668e4aa170efd23c474b2ad1
Body Params
basket
object
required
string
payments
array of objects
required
payments*
order
object
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json