Checkout shopper access

Select a delivery option

Requires the shopper access token, current quote and revision, and the offered carrier point or Store location required by the selected delivery type. This endpoint only changes the delivery selection. Send the Pango frame origin in Origin and the verified merchant origin in X-Pango-Parent-Origin. No Idempotency-Key is required. Treat the selection as saved only after a successful response.

put/api/checkout-widget/v1/checkouts/{token}/selection

Request

  • Base URL: http://localhost
  • URL: http://localhost/api/checkout-widget/v1/checkouts/{token}/selection
  • Auth: HTTP bearer

Headers

X-Pango-Parent-Originstring uri required
Originstring uri required

Request body

expected_revisioninteger required

Revision from the latest checkout response. A stale revision returns 409; read current state before retrying. Must be at least 1. Must not be greater than 2147483647.

quote_idstring required

ID of the current, unexpired quote. Must start with one of <code>quote_</code> Must not be greater than 64 characters.

option_idstring required

Option belonging to the current quote. Must start with one of <code>option_</code> Must not be greater than 64 characters.

service_point_idstring nullable

Carrier pickup-point ID offered by the selected option. Omit for other delivery types. Must start with one of <code>sp_</code> Must not be greater than 64 characters.

pickup_location_idstring nullable

Store location ID offered by a Pickup in Store option. Omit for other delivery types. Must start with one of <code>loc_</code> Must not be greater than 64 characters.

Example request

{
  "expected_revision": 4,
  "quote_id": "quote_example",
  "option_id": "option_example",
  "service_point_id": "sp_x7Kq9",
  "pickup_location_id": "loc_x7Kq9"
}

Response

Saved selection and new checkout revision.

Example response

{
  "data": {
    "checkout_token": "chk_example",
    "status": "open",
    "revision": 2,
    "currency": "SEK",
    "locale": "en",
    "ready": true,
    "expires_at": "2026-09-14T12:00:00+00:00",
    "quote": {
      "id": "quote_example",
      "expires_at": "2026-09-13T12:15:00+00:00",
      "options": [
        {
          "id": "option_example",
          "name": "Configured home delivery",
          "description": null,
          "amount_minor": 4900,
          "currency": "SEK",
          "delivery_type": "home",
          "preview": false,
          "carrier": {
            "name": "Configured carrier",
            "logo_url": null
          },
          "estimated_delivery": null,
          "badges": [
            "recommended"
          ],
          "service_points": [],
          "pickup_locations": []
        }
      ]
    },
    "selection": {
      "quote_id": "quote_example",
      "option_id": "option_example",
      "service_point_id": null,
      "pickup_location_id": null
    }
  }
}

Changes

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