Skip to content

Connecting to Stripe#

First Steps with Stripe#

Set up an account with Stripe.

Cost

This is a paid API.

Rate Limits

The Stripe API employs a number of safeguards against bursts of incoming traffic to help maximize its stability. Users who send many requests in quick succession may see error responses that show up as status code 429.

How to Connect DataDistillr to Stripe#

To set up a data source connection for Stripe, you will need to have:

  • A unique name for your data source connection to be used in queries.
  • The Secret Key generated by Stripe.

Data Source Form#

To locate the Stripe form, follow the steps in Connecting Your Data to DataDistillr. When you get to the window to choose the data source type, select API as shown below.

Select API from the available choices

On the API screen, select Stripe from list of API forms as shown in the image below.

Select Stripe API from available choices

The following form will appear. Instructions can be found below on how to find the information required to fill each field on the Stripe API form.

Once you have filled out all the fields, press the green 'Save' button, and your API will be connected!

Stripe Form

Name#

Enter any name that will help you recognize this data source from within your query window.

Acceptable characters include

  • lowercase alphanumeric characters
  • underscores

Secret Key#

You can access your Secret Key at your Stripe API Keys Page. Sign in if necessary. Click "Reveal test key" or "Real live key token" (Depending on your account) Sign in

Click on the API Key to copy. Copy API Key

Endpoints#

The table below shows a list of endpoints available to connect to within the DataDistillr application. If you need to connect to any endpoints not listed in the table below, please use the Custom API Form.

Endpoint Optional Params Description
/balance_transactions payout
type
created
currency
ending_before
limit
source
starting_after
Returns a list of all balance transactions.
/charges customer
created
ending_before
limit
payment_intent
starting_after
transfer_group
Returns a list of all charges.
/customers email
currency
ending_before
limit
starting_after
Returns a list of all customers.
/disputes charge
payment_intent
created
ending_before
limit
starting_after
Returns a list of all disputes.
/payouts status
arrival_date
created
destination
ending_before
limit
starting_after
Returns a list of all payouts
/refunds charge
payment_intent
created
ending_before
limit
starting_after
Returns a list of all refunds

The endpoint above will display as follows in the nav tree once your API has successfully connected.

Stripe Endpoints

Sample Queries#

The following queries are intended to help you get started, and make life simpler querying within your API.

For the following examples, suppose that my Stripe data source was called mystripeapi and I want to query an endpoint. The endpoint goes after the Stripe data source name:

FROM Clause

FROM `mystripeapi`.`<ENDPOINT>`

Get Balance Transactions Endpoint#

Get the list of all your Balance Transactions.

SELECT *
FROM `mystripeapi`.`/balance_transactions` LIMIT 1000

Get Charges Endpoint#

Get the list of your charges.

SELECT *
FROM `mystripeapi`.`/charges` LIMIT 1000

Get Customers Endpoint#

Get the list of all your customers.

SELECT *
FROM `mystripeapi`.`/customers` LIMIT 1000

Get Disputes Endpoint#

Get the list of all your disputes.

SELECT *
FROM `mystripeapi`.`/disputes` LIMIT 1000

Get Payouts Endpoint#

Get the list of all your payouts.

SELECT *
FROM `mystripeapi`.`/payouts` LIMIT 1000

Get Refunds Endpoint#

Get the list of all your refunds.

SELECT *
FROM `mystripeapi`.`/refunds` LIMIT 1000