The Stripe integration automatically captures all charge transactions from Stripe to allow you to analyze revenue data against behavioral data in Heap. With this integration, you’ll be able to answer questions like:
- How is feature adoption correlated with lifetime customer value?
- What type of customer behavior is a signal of churn risk?
To configure the Stripe source, you’ll need to have the following privileges:
- Admin or Architect privileges in Heap
- Admin privileges in Stripe
To get started, visit the Stripe source in the app and click Set Up in the top right corner of the page.
You will then be prompted to specify an email property if you haven’t set one up already for your account. The selected user property needs to be the user property associated with your users’ email addresses, as this is the property Stripe uses when sending Heap data about your users.
Email User Property Required
The property selected for Stripe needs to map to an email address user property (or identity) in Heap, and this property cannot be changed once selected. Please don’t hesitate to reach out to email@example.com if you’re unsure of what you want to select, or if you have the required data in Heap for this source.
Once the email property has been sent, you’ll be prompted to connect your Stripe account and be redirected to Stripe’s login page. Once authenticated, you’ll be redirected back to the Stripe source page in Heap with a successful confirmation message.
Upon completion, the source connection page will present
Waiting For Data until the first event data from Stripe is seen by Heap, at which point the connection status will change to
Please don’t hesitate to reach out if you have any questions or if you’re running into trouble with the source connection process.
Heap will automatically capture Stripe
charge events as defined by their API. They will be brought into Heap as four distinct event types under the
Charge Success: Occurs when a new charge is created and is successful.
Charge Failure: Occurs whenever a failed charge attempt occurs.
Charge Dispute: Occurs whenever a customer disputes a charge with their bank (chargeback).
Charge Refund: Occurs whenever a charge is refunded, including partial refunds.
Other Stripe Event Types
Heap current ingests only Charge events. Please let us know if you’re interested in additional event types (such as Subscription)!
On each event, Heap automatically attaches all non-object properties with non-null values based on the properties available in Stripe’s documentation for the charge object:
ID: The unique Stripe identifier for the object (ID).
Object Type: The string representing the type of event in Stripe (String).
Amount: A positive integer in the smallest currency unit
(e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal
currency) representing how much to charge. The minimum amount is $0.50 US or equivalent in charge currency (Number).
Amount Refunded: The amount in cents refunded (can be less than the amount
attribute on the charge if a partial refund was issued) (Number).
Application ID: The ID of the Connect application that created the charge (ID).
Application Fee: The application fee (if any) for the charge (Number).
Balance Transaction ID: The ID of the balance transaction that describes the impact
of this charge on your account balance (not including refunds or disputes) (ID).
Captured: If the charge was created without capturing, this boolean
represents whether or not it is still uncaptured or has since been captured (Boolean).
Charge ID: The ID of the charge (ID).
Created: The time at which the object was created. Measured in seconds since the Unix epoch (Timestamp).
Currency: The three letter ISO currency code in lowercase (String).
Customer ID: The ID of the customer this charge is for if an ID exists.
Description: The an arbitrary string attached to the object. Often useful for displaying to users (String).
Destination ID: The account (if any) the charge was made on behalf of,
with an automatic transfer (ID).
Dispute: Details about the dispute if the charge has been disputed (String).
Failure Reason: The reason for the refund failure if known (String).
Failure Balance Transaction ID: This balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction (ID).
Failure Code: The error code explaining the reason for charge failure if available (String).
Failure Message: The message to the user further explaining the reason for the charge failure if available (String).
Invoice ID: The ID of the invoice this charge is for if one exists (ID).
Is Charge Refundable: Whether or not a charge is refundable (Boolean).
Live Mode: Flag indicating whether the object exists in live mode or test mode (Boolean).
On Behalf of ID: The account (if any) the charge was made on behalf of
without triggering an automatic transfer (ID).
Order ID: The ID of the order this charge is for if an ID exists.
Paid: True if the charge succeeded, or was successfully authorized for later capture (Boolean).
Reason: The reason for refunded (String).
Receipt Email: The email address that the receipt for this charge was sent to (String).
Receipt Number: The transaction number that appears on email receipts sent for this charge. This attribute will be null until a receipt has been sent (String).
Refunded: Whether or not the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false (Boolean).
Refund Receipt Number: This is the transaction number that appears on email receipts sent for this refund (String).
Refund Status: The status of the refund (String).
Review ID: The ID of the review associated with this charge if one exists (ID).
Source Transfer: The transfer ID which created this charge. This is only present if the charge came from another Stripe account (ID).
Statement Descriptor: Extra information about a charge. This will appear on your customer’s credit card statement (String).
Status: The status of the payment, either succeeded, pending, or failed (String).
Transfer ID: The ID of the transfer to the destination account (only applicable if the charge was created using the destination parameter) (ID).
Transfer Group: A string that identifies this transaction as part of a group (String).
Once you’ve connected to Stripe, you can visit the Heap Properties page to see all
Stripe Event Properties available in your account.