Edit in GitHubLog an issue

Vaulting a credit card without a checkout authorization

These steps describe the flow of requests and responses required to vault a payment method without the typical checkout authorization with Payment Services enabled.

Workflow

Payment Services sequence diagram

  1. Run the getVaultConfig query to fetch the vault configuration details for the available payment methods. Attribute is_vault_enabled set to true.

  2. Commerce returns the vault configuration details.

  3. Run the createVaultCardSetupToken mutation to create a temporary setup_token associated to the given payment source.

  4. Commerce forwards token request to PayPal.

  5. PayPal returns the temporary setup_token to Commerce.

  6. Commerce receives the setup_token.

  7. PayPal SDK updates the credit card information in the storefront.

  8. Run the createVaultCardPaymentToken mutation to create a permanent vault_token_id and associate it with an optional card description, visible in the storefront.

  9. Commerce forwards setup_token to PayPal.

  10. PayPal returns a permanent vault_token_id to Commerce.

  11. Commerce vaults the payment method.

Additional payment information

The setup token is generated with an empty card number in the payment_source object purposefully. The PayPal SDK, in conjunction with hosted fields or credit cards field components, securely updates the setup token with payment details.

See PayPal SDK developer documentation for more information.

To run the createVaultCardPaymentToken mutation, use the setup_token generated by the createVaultCardSetupToken mutation.

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.