Baskets

Add a payment to a Basket

Attaches a payment intent or completed payment to the basket. Most commonly used to register a voucher or external-voucher payment alongside (or instead of) a card payment.

Behaviour depends on processor:

  • voucher / external_voucher — redeems the supplied voucher against the basket immediately. The amount defaults to the outstanding submit amount when omitted; supplying a smaller amount lets a customer split-pay across multiple methods.
  • stripe — accepted for compatibility but treated as a no-op: Stripe payments are added automatically after the customer returns from the Stripe Checkout flow.

Returns 400 Bad Request when the amount exceeds what's outstanding, when the chosen processor is misconfigured, or when the payment can't be created (e.g. voucher already spent).

post/shop/basket/{basketId}/payments

Request body

processor'voucher' | 'external_voucher' | 'stripe' required

The payment processor handling this payment. voucher and external_voucher redeem a voucher held on the basket; stripe is accepted as a no-op for clients that still POST after a Stripe Checkout redirect.

amountinteger

Amount to charge against this payment, in the smallest currency unit (e.g. pence, cents). Defaults to the basket's outstanding submit amount when omitted. Must not exceed the outstanding amount.

voucher_codestring

For voucher processors, the voucher code to redeem. Required when processor is voucher or external_voucher and the voucher hasn't already been attached via POST /shop/basket/{basketId}/vouchers.

notesstring

Optional free-text note recorded against the Payment.

Example request

{
  "processor": "voucher",
  "amount": 4800,
  "voucher_code": "GIFT-9F2K-AT3X",
  "notes": "Redeemed at checkout"
}

Response

The updated Basket with the new payment attached.

Changes

No recorded changes to this endpoint across all 1 revision of this API.