Payment Intents
Payment intents are the core payment object. Every checkout session creates a payment intent under the hood when the customer pays. You can also create payment intents directly for more control over the payment flow.
Payment intent lifecycle
CREATED → AUTHORIZED → CAPTURED → SETTLED. After capture and before the settlement clock, a refund can go to PARTIALLY_REFUNDED (leftover still settles at the original timelock) or REFUNDED (nothing left). It can also be CANCELLED (before capture). If a dispute is raised, it moves to DISPUTED and then DISPUTE_RESOLVED or DISPUTE_LOST.Create a payment intent
Retrieve a payment intent
Check a payment intent's status at any time. Useful for polling or verifying the state after receiving a webhook.
List payment intents
Cancel a payment intent
Cancel a payment that hasn't been captured yet. This releases the authorized funds back to the customer.
Refund a payment
Refund leftover escrow to the customer's wallet. Allowed on CAPTURED or PARTIALLY_REFUNDED before the settlement timelock. Omit amount and percent to refund all leftover. Partial refunds are EVM only.
Refund timing
PARTIALLY_REFUNDED andpayment.refunded has fullyRefunded: false. A full leftover refund sets REFUNDED and fullyRefunded: true.Webhooks
Listen for these events to track payment intent state changes:
| Event | Description |
|---|---|
payment.authorized | Customer gave approval to pull money from their wallet |
payment.captured | Funds taken from wallet, locked in escrow, and confirmed on-chain |
payment.settled | Funds released to your merchant wallet |
payment.refunded | Refund completed on-chain |
payment.disputed | Customer raised a dispute |
Methods reference
| Method | Description |
|---|---|
create(params) | Create a new payment intent |
retrieve(id) | Retrieve a payment intent by ID |
list(params?) | List payment intents with optional filters |
cancel(id) | Cancel an authorized payment |
refund(id, params) | Refund leftover (full, percent, or amount). Partial is EVM only. |
TypeScript types
Response body reference
All responses are wrapped in { success: true, data: ... }. The fields below describe what's inside data.
create() response
Returns all scalar fields only (no relations):
PaymentIntent (create)
idstringUnique payment intent ID (UUID)appIdstringYour app IDcustomerAccountIdstring | nullLinked customerexternalIdstring | nullYour external reference IDamountstringFiat amount (Decimal as string, e.g. "100.00")currencystringCurrency code, e.g. "USD"allowedChainsstring | number[]"ALL" or array of chain IDs (EVM + Solana e.g. 103)allowedTokensstring | string[]"ALL" or array of token symbolscaptureModestring"AUTOMATIC" or "MANUAL"timelockDurationnumberEscrow timelock in seconds (default 604800 = 7 days)disputeStartDurationnumberDispute window in seconds (default 86400 = 1 day)statusstring"CREATED" at creationauthorizationMethodnullSet when customer authorizesauthorizationChainIdnullChain used for paymentauthorizationTokenKeynullToken key used (e.g. "USDC-8453", "SOL-103")authorizationWalletAddressnullCustomer wallet addressauthorizationTxHashnullAuthorization transaction hashauthorizedAtnullTimestamp when authorizedcryptoAmountnullCrypto amount in smallest unitcryptoTokenKeynullToken key of crypto usedcryptoTokenDecimalsnullToken decimalsexchangeRatenullUSD-to-crypto exchange rate usedcaptureTxHashnullCapture transaction hashcapturedAtnullTimestamp when capturedcaptureAttemptsnumberNumber of capture attempts (0)timelockEndsAtnullWhen escrow timelock expiressettledAtnullTimestamp when settledrefundedAtnullTimestamp when fully refundedrefundTxHashnullRefund transaction hashrefundReasonnullReason for refundsettleAmountnullLeftover escrow token units (integer string)platformFeeBpsnullPlatform fee in basis pointsexpiresAtstring | nullISO 8601 expiration timestampsourceTypestring | nullWhat created this intent (CHECKOUT_SESSION, INVOICE, etc.)sourceIdstring | nullID of the source entitysuccessUrlstring | nullRedirect URL after paymentcancelUrlstring | nullRedirect URL if cancelledmetadataobjectYour metadata key-value pairsidempotencyKeystring | nullIdempotency key if providedcreatedAtstringISO 8601 creation timestampupdatedAtstringISO 8601 last update timestampretrieve() response
Returns all scalar fields from create() above, plus nested relations:
Additional fields on retrieve
transactionsTransaction[]On-chain transactions for this intentrefundsPaymentRefund[]Refund ledger rows for this intentdisputeDispute | nullDispute details if one existscustomerAccountCustomerAccount | nullCustomer who paidTransaction (nested in transactions[])
idstringTransaction record ID (UUID)paymentIntentIdstring | nullLinked payment intentmtxmTxIdstring | nullMTXM service transaction IDtxHashstring | nullOn-chain transaction hashchainstringChain identifiertypestringAUTHORIZE, CAPTURE, SETTLE, DISPUTE, REFUND, or PAYOUTstatusstringPENDING, CONFIRMED, or FAILEDblockNumbernumber | nullBlock number when confirmedgasUsedstring | nullGas used for the transactionerrorstring | nullError message if failedcreatedAtstringISO 8601 timestampconfirmedAtstring | nullWhen the transaction was confirmedDispute (nested in dispute)
idstringDispute ID (UUID)paymentIntentIdstringLinked payment intentreasonstringReason for the disputeevidencestring | nullEvidence submittedstatusstringOPEN, RESOLVED_MERCHANT, or RESOLVED_PAYERresolvedBystring | nullWho resolved the disputedeadlinestringDispute resolution deadlinecreatedAtstringISO 8601 timestampresolvedAtstring | nullWhen it was resolvedlist() response
Returns an array of payment intents. Each has all scalar fields plus transactions[]. No dispute or customerAccount in list.
cancel() response
Returns all scalar fields only (no relations). The status field will be "CANCELLED".
refund() response
Returns a refund submission object (not a full PaymentIntent). Status is PENDING until the chain confirms.
Key refund fields
paymentIntentIdstringPayment intent IDtransactionIdstringRefund transaction record IDmtxmTxIdstringMTXM transaction IDtxHashstring | nullOn-chain refund tx hash (when available)statusstringPENDING until confirmedamountstringRefunded escrow token units (integer string)leftoverAfterstringsettleAmount remaining after this refund