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:
- signs in to or creates a Belong wallet;
- adds the payment token if its balance is too low;
- adds a small amount of the network token through Belong if an ERC-20 spending approval needs a network fee;
- approves spending when required;
- confirms the payment through Thirdweb;
- 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