PaybytokenDocs
Payment Intents
API reference · Payment Intents

Payment Intents

Track one payment across crypto transfer and customer-balance payment methods.

A Payment Intent is the canonical lifecycle for one payment on one asset and chain. Its payment_method_type determines how funds move:

MethodFunds movementCustomer action
crypto_transferCustomer sends tokens to a one-time chain address.Transfer from a wallet.
customer_balanceFunds move from a merchant-scoped customer balance.Merchant confirms; manual capture is optional.
paybytoken_payAn authenticated consumer approves a Paybytoken balance payment.Complete a short-lived hosted handoff.

Create Payment Intents only from trusted server code. A direct crypto_transfer intent reserves payment instructions immediately; customer-balance methods never create an external destination address.

For Paybytoken hosted, embedded or custom checkout, create a Checkout Session instead. Checkout Sessions postpone address creation until the customer confirms the token and network.

Endpoints

MethodEndpointPurpose
POST/api/v1/payment_intentsCreate an intent for the selected funds-movement method.
GET/api/v1/payment_intents/:idRetrieve the complete intent and activity.
POST/api/v1/payment_intents/:id/confirmConfirm a customer-balance intent.
POST/api/v1/payment_intents/:id/captureCapture a manually authorized intent.
POST/api/v1/payment_intents/:id/cancelCancel an eligible intent and release an authorization.
GET/api/v1/payment_intents/:id/statusRetrieve a compact payment status.
PATCH/api/v1/payment_intents/:idUpdate description or metadata.
POST/api/v1/payment_intents/:id/checkAsk Paybytoken to check the destination address now.
GET/api/v1/payment_intentsList intents with offset pagination.

The compact status, update, manual chain check and list endpoints remain available for existing direct-transfer integrations. The versioned contract catalog identifies the preferred lifecycle surface.

Amounts

Send and receive token amounts as decimal strings, such as "15.25". Never send JavaScript floating-point numbers. The number of fractional digits must not exceed the selected token's decimals, and the amount must meet that token's minimum payment.

The PaymentIntent object

AttributeTypeDescription
idstringUnique Payment Intent ID.
account_idstringMerchant account that owns the intent.
payer_addressstring or nullSource wallet after a transfer is detected.
one_time_addressstring or nullDestination address for crypto_transfer; absent for balance methods.
chainstringSelected blockchain, such as base.
currencystringSelected token, such as USDC.
amountstringExact token amount requested.
amount_receivedstringTotal qualifying amount detected.
descriptionstring or nullMerchant-authored description.
metadataobject or nullMerchant-authored key-value data.
customerstring or nullAssociated merchant-scoped customer.
payment_method_typestringSelected funds-movement method.
capture_methodstringautomatic or manual.
amount_capturablestringAuthorized amount waiting for capture.
amount_capturedstringAmount captured by the merchant.
next_actionobject or nullRequired handoff, currently paybytoken_pay.
customer_emailstring or nullCustomer contact email.
receipt_emailstring or nullAddress intended to receive a receipt.
statusstringCurrent Payment Intent status.
tx_hashstring or nullPrimary payer transaction hash, when detected.
balance_detected_blocknumber or nullBlock where the primary payment was detected.
error_messagestring or nullActionable failure or review reason.
expired_attimestamp or nullLatest qualifying transfer time.
created_attimestampCreation time.
updated_attimestampLast update time.

Retrieval can also include token, balance_transaction, activities, and refund details. List responses include the resolved token for each item.

Statuses

StatusMeaning
requires_payment_methodNo qualifying transfer has been detected.
requires_additional_paymentA transfer was detected, but more funds are required.
requires_confirmationEnough funds were detected and are waiting for network confirmations.
requires_actionThe payment needs merchant review, for example because it arrived after expiry.
requires_captureCustomer funds are authorized and waiting for merchant capture.
confirmedThe payment has been confirmed for downstream processing.
succeededThe payment was finalized and credited.
canceledThe intent was canceled before payment confirmation.
failedThe intent failed.

Refund state is represented by separate Refund resources and does not rewrite the successful payment lifecycle.

Webhooks are the source of truth

Do not fulfill from a browser callback or a manual check response alone. Verify the signed payment_intent.succeeded webhook and make fulfillment idempotent.

On this page

API Workbench

Full Explorer

Open in new tab