Payment Intents
A payment intent represents a customer’s intention to pay a specific amount to a merchant. It’s the core object in the Stable Genius API — every payment starts with creating one.
Lifecycle
A payment intent moves through the following statuses:
Creating a Payment Intent
Required Fields
Optional Fields
Response Fields
Idempotency
Use the idempotency_key field to safely retry requests. If a network error occurs and you’re unsure whether the payment intent was created, resend the same request with the same idempotency key. We’ll return the existing intent if it was already created, or create a new one if it wasn’t.
Idempotency keys expire after 24 hours.
Expiration
Payment intents expire after the TTL window (default: 5 minutes). If no USDC is received by expires_at, the status transitions to expired and the payment address is released.
If a customer sends USDC to an expired payment intent’s address, the funds are still received by the merchant’s proxy contract and will be recorded as a transaction — but no payment_intent.confirmed webhook will fire for that specific intent. Use the transaction.created webhook to catch these edge cases.
Attach up to 10 key-value pairs to a payment intent. Metadata is not used by Stable Genius — it’s passed through to webhooks so your system can correlate payments with orders, terminals, or customers.
Common metadata patterns: