Welcome to Xendit’s latest documentation. For legacy content, access the previous version here.

Token Sharing for Cards

Prev Next

If you are integrating with our Cards Payments via API, you can also request to have Token Sharing enabled so that you can tokenize and create charges with different accounts, whether it’s the master account or one of your sub-accounts. Without this feature activated, only the account that tokenizes the card can create the charge.

XP Token Sharing Illustration

Please note that token sharing only works with multi-use tokens.

Limited Availability

Contact your Account Manager to request for this feature.

API Guide

  1. Follow this guide to tokenize when a customer submits their credit card information

    1. If you are making a request on behalf of a sub-account, set the for-user-id to the sub-account business ID. Leave this header out if you are tokenizing from the master account.

    2. Make sure to set is_multiple_use to true

  2. Store the returned credit_card_token_id in your system

  3. When a customer makes a purchase, you can now authenticate and charge the customer’s card

    1. If you are making a request on behalf of a sub-account, set the for-user-id to the sub-account business ID. Leave this header out if you are charging from the master account.

  4. With the token sharing feature activated, the charge should be successful even if the token was created on a different account