Stripe

Stripe is a payment gateway that facilitates payments (in person or online) by transferring money between a merchant account and a payment processor. It can be incorporated into websites and mobile applications and provides technical, fraud prevention and banking infrastructure to facilitate online payments.

For creating Pipelines using this Source, Hevo provides you a fully managed BigQuery data warehouse as a possible Destination. This option remains available till the time you set up your first BigQuery Destination irrespective of any other Destinations that you may have. With the managed warehouse, you are only charged the cost that Hevo incurs for your project in Google BigQuery. The invoice is generated at the end of each month and payment is recovered as per the payment instrument you have set up. You can now create your Pipeline and directly start analyzing your Source data. Read Hevo Managed Google BigQuery.


Prerequisites

  • An active Stripe account with either Administrator or Developer role. Read Teams and user roles.

  • Either a Restricted API Key or a Secret Key, which allows Hevo to read your Stripe data. Read Creating the API Key.


Configuring Stripe as a Source

Perform the following steps to configure Stripe as a Source in Hevo:

  1. Click PIPELINES in the Asset Palette.

  2. Click + CREATE in the Pipeline List View page.

  3. In the Select Source Type page, select Stripe.

  4. In the Configure Your Stripe Source page, specify the following:

    Stripe settings

  5. Click TEST & CONTINUE.

  6. Proceed to configuring the data ingestion and setting up the Destination.


Creating the API Key

You may create a Restricted API Key or a Standard Secret API Key and share it with us. The restricted API key gives you more control as to which objects you want to give Hevo access to. If you have an Administrator or Developer role, your API keys are always available in the Stripe Dashboard. Read Stripe’s documentation on API keys.

To create a restricted API Key:

  1. Go to the Developer Dashboard.

  2. Disable the Viewing test data option if it is enabled, in order to view live data.

  3. Scroll down to the Developers menu on the left and click API Keys.

    Create restricted API key

  4. Click Create restricted key.

  5. Specify a unique name for this API Key. For example, Stripe connector for Hevo.

  6. Select READ permission for each resource category, to apply it to all the resources within it:

    • Core

    • Billing

    • Checkout

    • Order

    • Connect

    • Issuing

    • Webhook

    • Reporting

  7. Once done, click Create API Keys at the bottom of the page.

    Create API Keys

  8. On your dashboard under the Restricted Keys section, click Reveal key token for the API keys that you just created, and copy it. You will provide this key while setting up Stripe as a Source in your Hevo Pipeline.

    Reveal API Key


Source Considerations

  • Stripe uses an events object to maintain a record of all updates and deletes made to the data for the following objects for the past 30 days:

    ACCOUNT, CHARGE, DISPUTE, REFUND, CUSTOMER, SUBSCRIPTION, INVOICE, ORDER, PAYMENT_INTENT, PAYOUT, PRODUCT, and SETUP_INTENT.

    Hevo refers to this events object while replicating the data to the Destination to make sure all deletes and updates are duly accounted for.

    Strip events object

    Make sure to select Stripe’s events object while creating your Pipeline, else, it can lead to a loss of any data updates captured by Hevo.

  • Pausing the Pipeline for 30+ days can lead to loss of data as the events object tracks updates and deletes for the past 30 days only.


Data Replication

Default Pipeline Frequency Minimum Pipeline Frequency Maximum Pipeline Frequency Custom Frequency Range (Hrs)
30 Mins 15 Mins 24 Hrs 1-24

Note: The custom frequency must be set in hours, as an integer value. For example, 1, 2, 3 but not 1.5 or 1.75.

  • Historical Data: Hevo ingests the historical data on the basis of the offset selected at the time of creating the Pipeline. By default, it starts fetching data from the time your Stripe account was created.

    Note: The time taken to fetch the historical data depends on the number of days selected at the time of creating the Pipeline. Hevo defaults this period to 30 days. If required, you may customize it to any number or even select the starting date of your Stripe account.

  • Incremental Data: Once the historical load is completed, each run of the Pipeline fetches the next available new and modified data. Hevo also fetches the Events object from Stripe, which tracks the updates and deletes made in the last 30 days, in order to sync the related Events with your Destination.


Data Model

The following is the list of tables (objects) that are created at the Destination when you run the Pipeline.

Table Description
Balance transaction A balance transaction shows funds moving through an account. Balance transactions are created for every in-flow and out-flow of funds to and from your Stripe account. Read Balance transaction types
Cards
(not in test environment)
All cards listed for a customer.
Charge A Charge is created to charge a credit or a debit card. You can retrieve and refund individual charges as well as list all charges. Charges are identified by a unique, random ID.
Customer The list of customers along with their default payment method and delinquency statuses.
Customer Balance Transaction Each customer has a balance value, which denotes a debit or credit that is automatically applied to their next invoice upon finalization.
Coupon A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to invoices or orders.
Discount A discount represents the actual application of a coupon to a particular customer. It contains information about when the discount begins and when it ends.
Dispute As a card issuer, one can dispute transactions that the cardholder does not recognise, suspects to be fraudulent, or has other issues with.
This table lists all disputes and dispute details pertaining to any transaction.
Dispute Balance Transaction The mapping between each dispute and transaction entities.
This is a custom table generated by Hevo to maintain data sanity.
Fee Detail Detailed breakdown of fees paid for each transaction present in the Balance Transaction table.
Invoice Statements of amounts owed by a customer. Invoices are either generated one-off or periodically from a subscription.
Invoice Line Item Each Invoice contains invoice line items and proration adjustments that may be caused by subscription upgrades/downgrades (if necessary).
Payment Intent Process of collecting a payment from your customer during a particular session.
Check out the payment flow followed at Stripe showing all possible payment outcomes here.
Payment Method The method of payment that a customer has used on one or more payment intent(s) along with details. Supported Payment Methods are Card (card/wallet), FPX, and ideal.
Payment Method Details Detailed data for each Payment Method that is created on your Stripe Account, will be individually stored in your destination to maintain data sanity.
Examples:

- payment_method_card
- payment_method_fpx
- payment_method_ideal
Payout Created when you receive funds from Stripe, or when you initiate a payout to either a bank account or debit card of a connected Stripe account.
Plan (pricing) Defines the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing.
Product Contains a list of all offers for the product. Each product can have multiple tiers of pricing plans.
Refund One or more refunds associated with a charge due to a dispute/return/failure to deliver service.
Setup Intent Process of saving a customer’s payment credentials for future payments.
Source Source objects allow you to accept a variety of payment methods. They represent a customer’s payment instrument, and can be used with the Stripe API.
Subscription Shows recurring charge information for a customer. Each subscription has multiple line items.
Subscription Item Contains line item data for each subscription. Each Line Item is associated with a Plan.

Schema and Primary Keys

Hevo uses the following schema to upload the records in the Destination:


Limitations

None.


Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Oct-25-2021 NA Added the Pipeline frequency information in the Data Replication section.
Aug-23-2021 1.70 Added the section, Source Considerations.
Last updated on 22 Oct 2021