Stripe
Sync payments, refunds, and disputes from Stripe automatically.
With the Stripe connector, you don't need to send payment events yourself. Referral API listens to your Stripe account and matches each payment to a referred customer.
Feature flag required
The Stripe connector is in beta. Ask support to enable it for your account.
Connect your account
Authorize
Open Settings → Integrations → Stripe and click Connect. You'll be sent to Stripe to approve read-only access.
Map customers
Tell us which field links a Stripe customer to your user. Most teams store their user ID in Stripe customer metadata:
await stripe.customers.create({
email: 'sam@example.com',
metadata: { external_id: 'user_2088' },
});Choose events
Pick which Stripe events count as qualifying payments. The default is invoice.paid for subscriptions and checkout.session.completed for one-off purchases.
What gets synced
| Stripe event | What happens |
|---|---|
invoice.paid | Counts as a payment. May convert a referral or add commission. |
charge.refunded | Reduces related rewards, based on your program rules. |
charge.dispute.created | Reverses related rewards in full. |
customer.subscription.deleted | Stops future commission for that customer. |
You can use the connector and the events API together. Events with the same payment ID are only counted once.
How is this guide?