Skip to main content
POST
Create payment intent
Creates a payment intent for the merchant identified by your API key.
  • Base URL: https://api.kryptopay.xyz
  • Auth: Authorization: Bearer <api_key>
  • Mode is inferred from your API key (testnet or mainnet)

Integration examples

cURL

Node.js (server)

Python (coming soon)

Python examples and helpers are planned. Until then, use normal HTTP requests with the same payload and Bearer auth.

Field guide (plain language)

  • amount_units: integer amount in smallest unit (USDC usually 6 decimals)
  • chain: target chain (base or polygon)
  • wallet_address: optional payout wallet override (0x...)
  • expires_in_minutes: checkout expiry window (server clamps to 5..60)
  • lane: checkout lane (sdk or manual)
  • metadata: your internal identifiers (order_id, customer_id, etc)
  • token: currently USDC

What you should persist

Persist at minimum:
  • your internal order ID
  • payment intent ID
  • returned mode/chain
  • status transitions in your backend

Error handling checklist

  • Retry transient failures (500, network)
  • Do not retry auth failures (api_key_missing, api_key_invalid)
  • Fix request shape for invalid_body
  • Log full response body for debugging and support

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
amount_units
integer
required

Payment amount in smallest token units (USDC uses 6 decimals).

Required range: x >= 1
chain
enum<string>
Available options:
base,
polygon
wallet_address
string

Optional recipient wallet override.

Pattern: ^0x[a-fA-F0-9]{40}$
expires_in_minutes
integer

Intent expiry in minutes. Server clamps to 5..60.

lane
enum<string>
Available options:
sdk,
manual
metadata
object
token
enum<string>

Optional token selector. Currently USDC only.

Available options:
USDC

Response

Payment intent created

id
string
required
status
string
required
Example:

"requires_payment"

client_secret
string
required
mode
enum<string>
required
Available options:
testnet,
mainnet
chain
enum<string>
required
Available options:
base,
polygon
chain_id
integer
required
confirmations_required
integer
required
amount_units
integer
required
decimals
integer
required
Example:

6

token_symbol
string
required
Example:

"USDC"

token_address
string
required
expected_wallet
string
required
expires_at
string<date-time>
required
expires_in_minutes
integer
required
lane
enum<string>
required
Available options:
sdk,
manual
metadata
object
required