There are two ways of creating a card token, either in advance, without withdrawing any money, or during a purchase process.Documentation Index
Fetch the complete documentation index at: https://docs.dintero.com/llms.txt
Use this file to discover all available pages before exploring further.
Creating token in advance
To store a token without performing a payment, do the following:Authentication
To authenticate, you create a Checkout API client and use the credentials to Create an access token. The same client can be used for Sandbox mode and production. For all requests to the API set the following header:Create token session
With the access token, call Payment token session with this body:Creating token while performing a purchase
To store a customer’s card information during the payment process, setgenerate_payment_token to true in the session configuration for the relevant payment provider.
When creating the session, include the configuration object with the provider-specific settings:
?includes=card.payment_token. If recurrence tokenization is enabled for PayEx,
get transaction details may also return a recurrence token with ?includes=card.recurrence_token.
See create session for more information. For payex (Swedbank Pay), it’s also
possible to disable CVC for returning payments if you have a dedicated agreement
with Swedbank Pay.
Save card checkbox (dintero_psp.creditcard)
When usingdintero_psp.creditcard, you can let the customer choose whether to save their card by adding
generate_payment_token_config with a save_card_checkbox setting. This displays a checkbox in the checkout UI (see image below).

- If
generate_payment_tokenistrueandgenerate_payment_token_configis omitted, the card is always tokenized (no checkbox shown). save_card_checkbox: "opt_in"— the checkbox is unchecked by default. The customer must actively check it to save their card.save_card_checkbox: "opt_out"— the checkbox is checked by default. The customer must actively uncheck it to prevent saving.
generate_payment_token must be set to true for save_card_checkbox to have any effect.