Stripe Source

Stripe is payments infrastructure for the internet, making it easy to process transactions and manage an online business. Segment makes it easy to get your data from Stripe (and lots of other sources) into your Data Warehouse for advanced analysis.

Take your company’s analysis to the next level by having SQL access to all your Stripe data alongside your customer event data in Redshift and Postgres.

With your Stripe data in your warehouse, you’ll be able to analyze your accounts, charges and subscriptions in SQL. Even cooler, you’ll be able to join your Stripe data with the Segment event data you’re already sending to your warehouse, so you can now do things like combining your stripe subscriptions or charges data with website activity and product usage data and analyzing them using your favorite business intelligence and sql querying tools.

Stripe is payments infrastructure for the internet, making it easy to process transactions and manage an online business. Visit Website

Take your company’s analysis to the next level by adding Stripe as a Source to Segment. We’ll automatically collect objects like Accounts or Coupons and load them into your data warehouse.

Getting Started

  1. From your workspace’s sources page, click add source.

  2. Choose Stripe.

  3. Give the source a nickname and a schema name. The nickname will be used to designate the source in the Segment interface, and the schema name is the namespace you’ll be querying against in your warehouse. Both can be whatever you like, but we recommend sticking to something that reflects the source itself, like Stripe for nickname and stripe or stripe_prod for the schema name.

    Note that you can add multiple instances if you have multiple Stripe accounts. That’s why we allow you to customize the source’s nickname and schema name!

  4. When you click connect, you’ll be dropped into Stripe’s OAuth flow. Once you sign in and grant permissions, you’ll be good to go!

Components

Sync

The Stripe source is built with a sync component, which means we’ll make requests to their API on your behalf on a 3 hour interval to pull the latest data into Segment. In the initial sync, we’ll grab all the Stripe objects (and their corresponding properties) according to the Collections Table below. The objects will be written into a separate schema, corresponding to the source instance’s schema name you designated upon creation (ie. stripe_prod.charges.

Our sync component uses an upsert API, so the data in your warehouse loaded via sync will reflect the latest state of the corresponding resource in Stripe. For example, if subscription_status goes from active to inactive between syncs, on its next sync that tickets status will be inactive.

The source syncs and warehouse syncs are independent processes. Source runs pull your data into the Segment Hub, and warehouse runs flush that data to your warehouse. Sources will sync with Segment every 3 hours. Depending on your Warehouses plan, we will push the Source data to your warehouse on the interval associated with your billing plan.

At the moment, we don’t support filtering which objects or properties get synced. If you’re interested in this feature, please let us know!

Collections

Collections are the groupings of resources we pull from your source. In your warehouse, each collection gets its own table.

For a complete visual breakdown of the Stripe collections, all their properties, and ID linkages between objects, view the visual schema here or download it in PDF form here.

CollectionTypeDescription
accountsobjectThis is an object representing your Stripe account. You can retrieve it to see properties on the account like its current e-mail address or if the account is enabled yet to make live charges. For more info, see Stripe’s API docs
application_fee_refundsobjectApplication Fee Refund objects allow you to refund an application fee that has previously been created but not yet refunded. Funds will be refunded to the Stripe account that the fee was originally collected from. For more info, see Stripe’s API docs
application_feesobjectWhen you collect a transaction fee on top of a charge made for your user (using Stripe Connect), an application fee object is created in your account. You can list, retrieve, and refund application fees. For more info, see Stripe’s API docs
balance_transactionsobjectBalance transactions lists the transaction balance history. For more info, see Stripe’s API docs
balance_transaction_fee_detailsobjectBalance transaction fee details include a breakdown of fees (in cents) paid for each transaction. For more info, see Stripe’s API docs
bank_accountsobjectBank accounts are used at Stripe in two ways: as a payment method on Customer objects and as a transfer destination on Account objects for managed accounts. The accepted and required parameters are different for each context. For more info, see Stripe’s API docs
bitcoin_receiversobjectA Bitcoin receiver wraps a Bitcoin address so that a customer can push a payment to you. This guide describes how to use receivers to create Bitcoin payments. For more info, see Stripe’s API docs
cardsobjectYou can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient or a managed account in order to transfer to those cards later. For more info, see Stripe’s API docs
chargesobjectTo charge a credit or a debit card, you create a charge object. You can retrieve and refund individual charges as well as list all charges. For more info, see Stripe’s API docs
couponsobjectA coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons only apply to invoices; they do not apply to one-off charges. For more info, see Stripe’s API docs
customersobjectCustomer objects allow you to perform recurring charges and track multiple charges that are associated with the same customer. For more info, see Stripe’s API docs
discountsobjectA discount represents the actual application of a coupon to a particular customer. It contains information about when the discount began and when it will end. For more info, see Stripe’s API docs
disputesobjectA dispute occurs when a customer questions your charge with their bank or credit card company. When a customer disputes your charge, you’re given the opportunity to respond to the dispute with evidence that shows the charge is legitimate. You can find more information about the dispute process in our disputes FAQ. For more info, see Stripe’s API docs
file_uploadsobjectThere are various times when you’ll want to upload files to Stripe (for example, when uploading dispute evidence). This can be done by creating a file upload object. When you upload a file, the API responds with a file token and other information about the file. The token can then be used to retrieve a file object. For more info, see Stripe’s API docs
invoice_itemsobjectSometimes you want to add a charge or credit to a customer but only actually charge the customer’s card at the end of a regular billing cycle. This is useful for combining several charges to minimize per-transaction fees or having Stripe tabulate your usage-based billing totals. For more info, see Stripe’s API docs
invoice_linesobjectWhen retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items For more info, see Stripe’s API docs
invoicesobjectInvoices are statements of what a customer owes for a particular billing period, including subscriptions, invoice items, and any automatic proration adjustments if necessary. For more info, see Stripe’s API docs
plansobjectA subscription plan contains the pricing information for different products and feature levels on your site. For more info, see Stripe’s API docs
refundsobjectRefund objects allow you to refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged. The fees you were originally charged are also refunded. For more info, see Stripe’s API docs
subscriptionsobjectSubscriptions allow you to charge a customer’s card on a recurring basis. A subscription ties a customer to a particular plan you’ve created. For more info, see Stripe’s API docs
transfer_reversalsobjectA previously created transfer can be reversed if it has not yet been paid out. Funds will be refunded to your available balance, and the fees you were originally charged on the transfer will be refunded. You may not reverse automatic Stripe transfers. For more info, see Stripe’s API docs
transfersobjectWhen Stripe sends you money or you initiate a transfer to a bank account, debit card, or connected Stripe account, a transfer object will be created. You can retrieve individual transfers as well as list all transfers. For more info, see Stripe’s API docs

If you have any questions or see anywhere we can improve our documentation, please let us know or kick off a conversation in the Segment Community!