Create Payment Intent
Creates a payment intent and returns the payment address and QR code for the customer to scan.
Request
Payment amount in USD. Minimum: 0.01. Maximum: 10000.
Currency code. Currently only "usd" is supported.
The merchant’s Stable Genius ID (format: mer_*).
Arbitrary key-value pairs to attach to the payment intent. Max 10 keys, 500 characters per value. Returned in webhooks.
Time-to-live in seconds. Default: 300 (5 minutes). Min: 60. Max: 3600.
Unique key for idempotent requests. If the same key is sent within 24 hours, the existing payment intent is returned.
Response
Unique payment intent ID (format: pi_*).
"awaiting_payment" on creation.
The merchant receiving the payment.
On-chain address for the customer to send USDC to.
Blockchain network (e.g., "base").
Token symbol (e.g., "USDC").
EIP-681 formatted URI for QR code rendering. Compatible with Coinbase Wallet, MetaMask, and other EIP-681 wallets.
URL to a hosted PNG image of the QR code (400x400px).
ISO 8601 timestamp when the payment intent expires.
curl -X POST https://api.stablegenius.co/v1/payment-intents \
-H "Authorization: Bearer sk_test_abc123" \
-H "Content-Type: application/json" \
-d '{
"amount": 4.50,
"currency": "usd",
"merchant_id": "mer_abc123",
"metadata": {
"order_id": "order_456",
"terminal_id": "pos_01"
}
}'
{
"id": "pi_xyz789",
"object": "payment_intent",
"status": "awaiting_payment",
"amount": 4.50,
"currency": "usd",
"merchant_id": "mer_abc123",
"payment_address": "0x1a2b3c4d5e6f7890abcdef1234567890abcdef12",
"chain": "base",
"token": "USDC",
"qr_payload": "ethereum:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913@8453/transfer?address=0x1a2b3c4d5e6f7890abcdef1234567890abcdef12&uint256=4500000",
"qr_image_url": "https://api.stablegenius.co/v1/qr/pi_xyz789.png",
"expires_at": "2026-04-01T20:05:00Z",
"metadata": {
"order_id": "order_456",
"terminal_id": "pos_01"
},
"created_at": "2026-04-01T20:00:00Z"
}