How to Checkout a Basket

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

After a basket is created, the checkout process creates an order in Deliverect, which is then sent to the customer’s POS system. The checkout flow can vary depending on the payment method used.

Payment Methods

MethodDescription
Third partyExternal payment provider
Deliverect pay - DpayPayment provider connected via Deliverect. The redirection happens via Deliverect.
Gift CardGift Card provider connected via Deliverect.
MultipleCombination of various methods

Deliverect Pay - Dpay

Deliverect customers can configure payment methods via Deliverect. In order to checkout via DPay, the customer must have configured an **Online **payment method. Consult this guide here on how to request a payment to before proceeding to basket checkout.

The payment request will provide a redirection link to the payment provider to complete the transaction.

⚠️

The payment must be authorised before proceeding to the checkout.

The payment update webhook URL must be monitored to confirm the payment has been authorised "status":"authorized".

Third Party

If payments are handled by an external provider and processed independently (outside Deliverect), the checkout method must be configured as third_party.

Unpaid orders

Commerce partners may need to submit unpaid orders which is a common for pickup order type. To do this, use the third_party payment type and set isPrepaid to false. If this method is selected, orders are injected into the POS as unpaid. Payment cannot be updated later via Deliverect; the order must be marked as paid in the POS.

"payments": [
      {
        "type": "third_party",
        "externalId": "{{$guid}}",
        "isPrepaid": false,
        "amount": 800,
        "metadata": {}
      }
    ]

Order Identifiers

It is possible to supply the platform’s order identifiers during checkout via the order object.

  • channelOrderId: the full unique ID from the ordering channel. It must not be reused within 48 hours after pickup (across all accounts).
  • channelOrderDisplayId: a human-readable order reference, typically printed on the POS receipt and used by couriers to identify orders.
"order": {
  "channelOrderId": "",
  "channelOrderDisplayId": ""
}

Checkout status

Across payment methods, a well-formed basket checkout receives an HTTP 200 OK response. Completion occurs asynchronously; use the confirmation delivered to your checkout update webhook URL to confirm success.

⚠️

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