Skip to main content

Create Payment Intent

POST /v1/payment_intents

Overview

Creates a new payment intent to initiate a payment process. This endpoint generates a one-time address for the payer to send funds, supporting specific blockchain currencies.

Authorization

  • Header: Authorization: Bearer sk_test_907...de66
Request Details

Request

curl https://api-prod.paybytoken.io/v1/payment_intents \
-X POST \
-H "Authorization: Bearer sk_test_907...de66" \
-H "Content-Type: application/json" \
-d '{
"amount": "15",
"currency": "USDC",
"chain": "base"
}'

Request Parameters

ParameterTypeDescription
amountstringThe amount to be paid (e.g., "15").
currencystringThe currency code (e.g., "USDC").
chainstringThe blockchain chain (e.g., "base").
Response Details

Response

The response returns a PaymentIntent object containing details about the created payment intent. See Payment Intents Overview for the full object definition.

Example Response

{
"id": "pay_t24b28nbodnk4icGMyE7",
"account_id": "acct_1",
"payer_address": null,
"one_time_address": "0xa1A0340cF7b9326eA4210AB49c17e20e0c32a2FB",
"chain": "base",
"amount": "15.0",
"currency": "USDC",
"amount_received": "0.0",
"description": null,
"metadata": null,
"customer_id": null,
"customer_email": null,
"status": "requires_payment_method",
"tx_hash": null,
"created_at": "2025-09-05T13:34:56.000Z",
"updated_at": "2025-09-05T13:34:56.000Z",
"expired_at": "2025-09-05T13:44:56.000Z"
}