Skip to main content
The Stripe destination sends each row of an import to a Stripe API endpoint that you choose, such as creating a customer or a product. CSVbox loads the list of endpoints from Stripe’s published API specification and lets you map your sheet columns to the fields each endpoint expects. It works like the OpenAPI destination, with Stripe’s specification and authentication already set up.

Before you start

You need a Stripe API key: a secret key (sk_test_... or sk_live_...) or a restricted key (rk_...). Find it in the Stripe Dashboard under Developers > API keys.
Use a restricted key that only allows what the import needs. CSVbox checks the key by reading your Stripe account, so give the key read access to account information, plus write access to the resources you’ll create, for example Customers or Products.
The key’s mode decides where data goes. A test-mode key creates objects in your Stripe test environment; a live-mode key creates real objects. Test with a test-mode key first.

Set up the destination

1

Select Stripe as the destination

Open your importer, go to the Destination tab and choose Stripe.
2

Enter and test your key

Paste your key into Stripe Secret Key and click Test Connection. A green check means Stripe accepted the key.You can’t save the destination until the test succeeds. If you change the key, test it again.
3

Choose the endpoint

When the key is entered, CSVbox loads Stripe’s endpoints. Choose one under Stripe API Endpoint, for example POST /v1/customers. Only endpoints that create or update data (POST) are listed. Click Reload Specification to load the list again.
4

Map columns

Click Map Columns. For each sheet column and virtual column, choose the Stripe field it fills, or leave it as (empty). Required fields are listed first and marked with *. Columns whose names match a Stripe field are mapped for you.Click Save in the dialog.
5

Save

Save the destination. Every required field of the endpoint must be mapped.

How rows are sent

  • CSVbox sends one request per row, one row at a time.
  • Nested Stripe fields are listed with dot and bracket notation, for example address.city or metadata.order_id, so you can map a column to each.
  • Values are converted to the type Stripe expects. For true/false fields, true, 1, yes and on mean true, and false, 0, no and off mean false. For list fields, separate values with commas.
  • Requests that Stripe rate-limits or that fail because of a temporary error are retried up to 3 times.
Importing the same file again sends the rows again. For endpoints that create objects, this creates duplicates in Stripe.

Results and errors

When every row succeeds, the import is marked Success. If some rows fail, it’s Partial; if none succeed, it’s Failed. Open the import on the Imports page and click the row count to see the error log. Each failed row shows its row number and Stripe’s response, for example HTTP 400: {"error": {...}}.

Setup messages

Using environment variables

The key can use a {{variable}} placeholder filled from the importer’s environment variables, for example to use a different Stripe account per customer.
The key is stored encrypted. Copying an importer copies its Stripe destination, including the key.