Create payment (intent)
POST/payments
Creates a PaymentIntent. The merchant hands the returned checkout_url to the buyer (via redirect or link) to start payment. checkout_id is the identifier of the same page; you should not need to assemble a URL yourself.
- The
Idempotency-Keyheader prevents duplicate creation (24h TTL, Redis-cached). metadatais stored and returned as opaque JSON; CROSS Pay does not interpret it.- Pass
amountas a string (preserves shopspring/decimal precision). expires_inis in seconds; defaults to 30 minutes when 0 or unset.checkout_urlhas the form{checkout.base_url}/{checkout_id}, and is omitted from the response in dev environments whencheckout.base_urlis empty.- When
country(ISO 3166-1 alpha-2, optional) is supplied, it is forwarded as?country=XXon the responsecheckout_urlso the hosted checkout page can pre-select the billing country. Not persisted to the DB — thecheckout_urlon subsequent GET responses will not carry the query. include_pegged_assets(optional, defaulttruesince v0.7.55 — previouslyfalse) controls whether a fiat-currency payment also offers stablecoins pegged to that fiat (e.g. USD → USDT / USDC / CROSSD) on the hosted checkout. Send an explicitfalseto keep the checkout fiat-only. Payments whosecurrencyitself is a token symbol (USDT) are unaffected by this flag.
Request
Responses
- 200
- 201
- 400
- 401
- 409
FDS denied the request. The HTTP status stays 200 (this is a business outcome, not a transport-level error) and the body is the { fds: ... } envelope. Any /v1/payments endpoint can return this response.
Payment created successfully
Bad request
Authentication failed
Idempotency key conflict