API Reference
Payment sessions
One-shot hosted checkouts.
A PaymentSession is everything needed to render a hosted checkout for a single payment. Created server-side, paid by the customer in their wallet, confirmed by the indexer.
Create
Returns:
Retrieve
List
Filters: status, customerId, createdAfter, createdBefore.
Cancel
Cancels a pending session. Already-confirmed sessions can't be cancelled. Refund the payment instead.
Status lifecycle
Sessions expire 24 hours after creation by default. expiresAt is set when you create the session.
Webhook events
| Event | Fires when |
|---|---|
payment.created | The session row was created |
payment.completed | The on-chain transaction confirmed |
payment.failed | The session expired or was cancelled |
