Skip to main content
This document describes two ways to back up Stripe.com payment-method data. A quick overview of the backup process will help you understand the options.

Backup Approach

Stripe.com offers a forward API to forward payment-method data to third-party services.
The API is a gated feature on the Stripe.com platform. You need to request access from support.
Conceptually, the backup process is a call to the forward API with a reference to a payment method. Stripe.com then forwards the sensitive cardholder data (CHD) to Commerce. Commerce imports the data and returns a Commerce token in exchange; this token is returned by the forward API to the caller.
Stripe Token Backup
As the forward API is gated, you need to request access first. Create a Stripe.com support request on your account with the following information:
You will need the PCI DSS Attestation of Compliance from Starfish, which you can get from your account representative.

Option 1 - Selective Backup

To back up only selected payment methods at Stripe.com, trigger the forward API for each payment method.

Request

Replace the placeholders with your actual values:
  • STRIPE_API_KEY: Your Stripe.com API key
  • STRIPE_PAYMENT_METHOD_ID: The payment-method id from Stripe.com
  • COMMERCE_API_KEY: Your Commerce API key

Response

The response includes the created Commerce token; you can store its ID in your system. If you send the Stripe.com payment-method id as metadata, you can trace the token back via the business_key attribute.

Option 2 - Automatic Sync

To synchronize the entire payment-method set from Stripe.com to Commerce, use the import automation service. It triggers the forward API on your behalf and imports payment methods into Commerce. Depending on volume, the process can take a while.
Inform your Commerce account representative about your import plans so we can allocate the appropriate resources.
Request an import via API. The system processes the request and sends a webhook notification when the import is completed. Commerce stores the original payment-method id (business_key) with each token so you can trace tokens back to their origin.

Create an Import Request

Pass your Stripe.com API key in the request. The key is used only to authenticate to Stripe.com and trigger the forward API; it is not exposed to other systems.
The response includes the ID of the import job. Use this ID to track progress by requesting the import status.

Check Import Status

The import starts in state preparing, then changes to running, and finally to finished when completed. See the API documentation for more details on the import API.