Skip to main content
This page is part of the REST API Guides. Card capture happens in the frontend through the Payments Library; see the Payments Library Guides.
Prerequisites: API key and Payment Gateway Account with a gateway that supports tokenization. Gateway tokenization creates a token stored directly with your payment processor (Stripe, Adyen, etc.) for recurring billing. This is different from String Tokenization, which stores data in Orchestra’s vault.
Not all payment gateways support tokenization. For a complete list of integrations that support gateway tokenization, see Gateway Token Integrations. You can also check your gateway’s capabilities programmatically using the List Gateways endpoint.
These examples show raw card details for completeness. Sending raw card data means it passes through your systems and puts you in PCI DSS scope. The standard integration captures the card with the Payments Library, which returns a token directly, so your backend does not need to send a raw cardNumber to this endpoint.

When to Use Gateway Tokens

Create a Gateway Token

Endpoint: POST /PaymentGateway/tokenize

Tokenize API Reference

Complete parameter reference for tokenization requests

Response

The gatewayToken value is the processor-specific token you’ll use for future charges.

Tokenize While Charging

You do not need a separate call to get a token. Add generateToken: true to a charge or authorize request and the response carries the gatewayToken alongside the payment result:
This is the usual choice when the first payment and the saved card happen together, for example a subscription whose first month is charged at signup. It saves a round trip and avoids a second authorization against the card.
Use the standalone POST /PaymentGateway/tokenize call when you need a token without taking a payment, and generateToken when you are charging anyway. See Scheduled Payments for how the resulting token is used for recurring billing.

Using Gateway Tokens

Once you have a gateway token, use it with the userToken parameter in charge or authorize requests:

Gateway Token vs String Token

String Tokenization

Store any data in Orchestra’s vault

Charge Payments

Use tokens in payment requests