You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As this integration doesn't support table or column selection, all available tables and columns are automatically replicated.
false
false
false
true
true
postgres
reason
sometimes
Tables and columns created as a result of de-nesting nested data may have names that exceed PostgreSQL's limit of 63 characters for tables and 59 characters for columns. PostgreSQL data warehouses will reject these tables and columns, meaning Stitch will be unable to load them.
info about charges to credit and debit cards.<br><br>
<strong>Note that charge dispute data is not included in this table.</strong> See Table Info & Attributes for details.
### Charge Dispute Support
Due to the current structure of our Stripe integration and [how updates work in the Stripe API](#stripe-api-updates), records in this table will not be updated if a related dispute is updated.
You can, however, find this info in the [`stripe_events`](#stripe_events) table.
info about percent or amount-off discounts that may be applied to a customer. <strong>Note that coupons only apply to invoices; they don't apply to one-off charges.</strong>
info about events. <a href="https://stripe.com/docs/api/curl#event_types" target="new">When an interesting event occurs</a>, a new event object is created. For example, when a charge succeeds a <code>charge.succeeded</code> event is created; or, when an invoice can't be paid, an <code>invoice.payment_failed</code> event is created.
### Event Replication {#events-replication}
The `stripe_events` table is sort of a "grab bag" of all events across all endpoints, or tables. For every event that takes place on a parent object, a row will be added to the table.
For example: If a customer account is updated, you'll see the latest state of the customer's account info in the `stripe_customers` table. You'll also see a row in **this** table for the actual **update** event itself.
info about customer invoices. <strong>Note that this does not include upcoming invoices</strong> - see the Table Info section for details.
### Upcoming Invoices
Stitch's Stripe integration doesn't currently replicate [upcoming invoices](https://stripe.com/docs/subscriptions/invoices#previewing){:target="_blank"}, which Stripe defines as "the next upcoming invoice."
This is due to the way Stripe generates and assigns IDs to invoices. Existing invoices have IDs while upcoming invoices do not. As Stitch uses the `id` column to identify new data for replication, if an invoice doesn't have an ID, Stitch will be unable to replicate it.
pricing information for different products and feature levels on your site. For example, you may have a $10/month plan for basic features and a $20/month plan for premium features.
info about your transfers. A transfer is created any time Stripe sends you money or you initiiate a transfer to a connected account, including bank accounts and debit cards.
The user who sets up the integration must have Admin permissions in Stripe. If you don't have these permissions, please loop in a Stripe admin before continuing.
{% include integrations/shared-setup/connection-setup.html %}
{% include integrations/saas/setup/historical-sync.html %}
{% include integrations/shared-setup/replication-frequency.html %}
Authorize Stitch to Access Stripe {#authorize-stitch}
Lastly, you'll be directed to Stripe's website to complete the setup. Remember you must have Admin permissions in Stripe for the connection to be successful.
A screen asking for authorization to Stripe will display. Note that Stitch will only ever read your data.
Click Sign in with Stripe to connect.
Enter your Stripe credentials and click Sign into your account.
After the authorization process successfully completes, you'll be redirected back to Stitch.
Click {{ app.buttons.finish-int-setup }}.
{% include integrations/shared-setup/initial-syncs.html %}
{% endcontentfor %}
{% contentfor replication-notes %}
Stripe's API uses an event-based approach to create and update data points. Because this approach can create large numbers of records and drive up your row usage, it's important to understand how Stripe's API works and how Stitch queries it for data as a result.
In this section, we'll be using the word "object" to refer to the entities (ex: customer) contained within an API.
Updates in "Traditional" APIs {#traditional-api-updates}
When we talk about "traditional" APIs, we mean the kind that only have a single type of object. In this case, when a record is updated, only that object is "notified."
If, for example, a customer email address is updated, only the customers object would be affected.
By this we mean that only the row in the customers table for that particular account would change. The email field would show the new email address and the updated_at field would show the time the change - or event - happened.
To summarize: one change = one row.
Updates in Stripe's API {#stripe-api-updates}
Stripe works a little differently than the traditional API we outlined above: it's designed to use a change - or an event - to one object to update another.
Instead of having just one object like customers that is directly updated, Stripe's API has two: a "parent" object (customers) and an "update" object (update_customers).
Let's use the updated customer email example again. If a customer email address is updated, several things will happen in Stripe's API as a result of its event-based update method:
A row will be created in the stripe_events table to record the event details,
A row will be created in the stripe_update_customers table,
The row in the stripe_customers table for that customer's account will be updated based on the corresponding data in stripe_update_customers
In this case, one change doesn't equate to a single row. That single change resulted in the creation of three rows.
Additionally, note that:
Stitch doesn't persist the update objects to your data warehouse as tables, but still queries them to be able to update the parent object tables accordingly.
Updates to events that update other events aren't currently supported. For example: if a dispute is updated, the related charge in the stripe_charges table will not be updated.
You can, however, find this info in the stripe_events table.
Impact on Row Counts {#row-count-impact}
Because a single event can result in creating or updating multiple rows, Stripe can potentially drive up your row usage. Additionally, Stripe deeply nests their data. If you use a data warehouse that doesn't natively support nested structures, Stitch will de-nest these records and create subtables, resulting in a greater number of replicated rows.
To counter this, we recommend setting the Replication Frequency to something less frequent - like every 24 hours instead of every 30 minutes - to help keep your row count down.
{% endcontentfor %}