Skip to content

Checkout Lifecycle ​

A checkout has four states:

  • PENDING: the customer may continue payment;
  • COMPLETED: the on-chain payment and NFT mint were verified;
  • EXPIRED: the session lifetime ended before payment;
  • FAILED: the checkout was stopped by a terminal server-side failure.

The hosted page reads the client-safe session with its checkoutId and clientSecret. Product and order details are immutable after creation.

On a wallet checkout, the customer:

  1. signs in to or creates a Belong wallet;
  2. adds the payment token if its balance is too low;
  3. adds a small amount of the network token through Belong if an ERC-20 spending approval needs a network fee;
  4. approves spending when required;
  5. confirms the payment through Thirdweb;
  6. receives the NFT automatically after the transaction succeeds.

The server reconstructs and verifies the transaction receipt before completing the checkout. A transaction hash can complete only one checkout.

If webhook delivery fails, an authorized store backend can request another delivery:

http
POST /api/v3/checkout/sessions/{checkoutId}/webhook/retry
x-api-key: YOUR_SERVER_API_KEY

All rights reserved.