PaybytokenDocs
Payment Intents
API reference · Payment Intents

Create a Payment Intent

Create one crypto-transfer or Paybytoken Pay payment lifecycle.

POST /api/v1/payment_intents

Create this resource from your server. The default crypto_transfer method returns one-time chain payment instructions. Paybytoken Pay returns a hosted-consumer authorization action instead.

The default crypto_transfer method creates chain payment instructions. Private-beta merchants may instead request payment_method_types: ["paybytoken_pay"]; that flow returns requires_action and must be approved by the authenticated consumer through a ConsumerPaymentSession.

curl https://api-prod.paybytoken.io/api/v1/payment_intents \
  -X POST \
  -H "Authorization: Bearer $PAYBYTOKEN_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "15.25",
    "currency": "USDC",
    "chain": "base",
    "description": "Order 123",
    "metadata": { "order_id": "order_123" },
    "customer_email": "customer@example.com",
    "receipt_email": "receipts@example.com"
  }'

Request body

ParameterTypeRequiredDescription
amountstringyesPositive decimal token amount. Fractional digits cannot exceed token precision.
currencystringyesEnabled token code, such as USDC.
chainstringyesEnabled network code, such as base.
descriptionstringnoDescription shown in merchant records.
metadataobjectnoMerchant-authored key-value data.
customerstringbalance methodsExisting merchant-scoped customer ID.
customer_idstringnoDeprecated alias for customer.
customer_emailstringnoCustomer contact email.
receipt_emailstringnoEmail address intended to receive the receipt.
expired_attimestampnoFuture expiry. When omitted, the platform payment timeout is used.
payment_method_typesstring[]noOne of crypto_transfer or private-beta paybytoken_pay; defaults to crypto_transfer.
capture_methodstringnoautomatic only.
confirmbooleannoConfirm the intent in the create request. Defaults to false.

Response

The following response illustrates the default crypto_transfer method. Balance methods return the same canonical Payment Intent lifecycle fields but do not return a one-time chain address.

{
  "id": "pay_t24b28nbodnk4icGMyE7",
  "account_id": "acct_1",
  "payer_address": null,
  "one_time_address": "0xa1A0340cF7b9326eA4210AB49c17e20e0c32a2FB",
  "chain": "base",
  "currency": "USDC",
  "amount": "15.25",
  "amount_received": "0.0",
  "amount_capturable": "0.0",
  "amount_captured": "0.0",
  "payment_method_types": ["crypto_transfer"],
  "payment_method_type": "crypto_transfer",
  "capture_method": "automatic",
  "description": "Order 123",
  "metadata": { "order_id": "order_123" },
  "customer_id": null,
  "customer_email": "customer@example.com",
  "receipt_email": "receipts@example.com",
  "status": "requires_payment_method",
  "tx_hash": null,
  "balance_detected_block": null,
  "error_message": null,
  "created_at": "2026-07-29T10:15:00.000Z",
  "updated_at": "2026-07-29T10:15:00.000Z",
  "expired_at": "2026-07-29T10:30:00.000Z"
}

See Payment Intents for the full object and lifecycle.

On this page

API Workbench

Full Explorer

Open in new tab