PayclaveDocs

Payclave developers

Hosted checkout

Create checkout and separate payment progress from verified fulfillment.

Create one checkout for one order operation

Authenticate the buyer on your backend, load the order price, and create a session with a stable idempotency key. Save the invoice and checkout IDs before returning checkoutUrl. A publishable-key flow supports limited fixed-price use; production carts should use server-owned amounts.

The customer's payment route can differ from the merchant settlement network. Use the session's recipient, chain, token contract, and amount fields when explaining or reconciling a payment. A route is available only when checkout offers it for the supported source token and network.

bash
curl https://api.payclave.com/v1/checkout-sessions \  -H "Authorization: Bearer sk_test_..." \  -H "Content-Type: application/json" \  -H "Idempotency-Key: order_8431" \  -d '{    "amount": "25.00",    "customerEmail": "customer@example.com",    "externalReference": "order_8431",    "successUrl": "https://merchant.example/orders/8431/success",    "cancelUrl": "https://merchant.example/cart",    "metadata": { "cartId": "cart_8431" }  }'

Separate payment progress from fulfillment

pending and processing describe a payment still in progress. Read the verified invoice and cumulative customer credit before fulfillment. A payment can cover only part of an invoice, and a late payment may confirm after the browser closes or checkout expires.

The success URL is a return destination. The signed invoice.paid event and independently verified records are the fulfillment evidence. Treat wallet broadcasts, transaction hashes, source-wallet callbacks, and route-provider responses as progress until verification completes.

On this page