Set up a Spreedly environment and obtain your environment key and access secret from the Dashboard.
Collect the customer's card details using Spreedly's iFrame tokenization form or the API endpoint `POST /v1/payment_methods` (server-to-server, from a PCI-compliant server); Spreedly returns a payment method token.
Provision at least two gateways in your environment via `POST /v1/gateways` with the respective credentials; each gateway receives a unique Spreedly gateway token.
Execute a purchase or authorization against the primary gateway: `POST /v1/gateways/{gateway_token}/purchase` with `payment_method_token`; inspect `transaction.succeeded` and `transaction.response` in the response.
To charge the same card on a different gateway (for example, for a retry or a different market), repeat the purchase call using the same `payment_method_token` with a different `gateway_token`; no re-collection of card data is required.
For recurring or stored-credential transactions, include the `stored_credential` object with `initiator`, `reason_type`, and `network_transaction_id` from the initial CIT to comply with card network MIT requirements.
Known gotchas
Spreedly payment method tokens are stored in Spreedly's vault, not the gateway's; the card is never sent to your servers, but Spreedly transmits it to each gateway on your behalf — confirm each gateway's PCI and data-residency requirements.
The `retain` parameter must be set to `true` when creating a payment method via the API if you want to vault the card for future use; without it, Spreedly may redact the card after the first transaction.
Each gateway has its own requirements for stored-credential fields (MIT framing, network transaction IDs); check the Spreedly gateway-specific guide for each gateway you add to ensure compliant recurring charge requests.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp