Integrations

Stripe Integration

Connect your Stripe account to AFFY and every payment is automatically tracked, attributed to the right affiliate, and triggers commission calculation — no manual work required.

Before connecting Stripe, make sure you have:
  • Installed the AFFY tracking script on your website — without it, customer clicks can't be linked to Stripe payments
  • Created at least one commission flow — AFFY needs a flow to calculate the commission amount when a payment arrives
The Stripe integration uses OAuth to securely connect your account. AFFY never stores your Stripe secret key — it only receives webhook events from Stripe.

Connecting your Stripe account

Go to Settings → Integration

In your AFFY dashboard, navigate to Settings and click the Integration tab.

Click Connect Stripe

Find the Stripe section and click Connect with Stripe. You'll be redirected to Stripe's OAuth authorization page.

Authorize AFFY

Log in to your Stripe account (if not already logged in) and click Connect my Stripe account to grant AFFY access.

You're connected

You'll be redirected back to AFFY. The Integration tab will now show your Stripe account as connected.

How automatic tracking works

Once connected, Stripe sends webhook events to AFFY whenever a payment occurs. AFFY matches the customer to an affiliate click (via the tracking cookie) and creates a commission automatically.

1
Visitor clicks affiliate link

The AFFY tracking script records the click and stores a click_id cookie on the visitor's browser (30-day window).

2
Visitor registers or signs up

If you call the registration tracking endpoint, AFFY links the customer account to the affiliate click.

3
Payment succeeds in Stripe

Stripe sends a payment_intent.succeeded (or invoice.payment_succeeded for subscriptions) webhook event to AFFY.

4
AFFY attributes the commission

AFFY matches the customer email to the tracked affiliate click and creates a Pending commission using the affiliate's assigned flow.

5
You approve and pay

Review the commission in the Payouts section, approve it, and mark it as paid when you transfer funds to the affiliate.

Supported Stripe events

AFFY processes the following Stripe webhook events automatically. You do not need to configure anything in your Stripe dashboard — the webhook endpoint is registered during the OAuth connection.

Stripe EventWhat AFFY does
payment_intent.succeededRecords a conversion and creates a commission for the attributed affiliate.
invoice.payment_succeededTracks recurring subscription payments — each successful invoice can generate a commission.
charge.refundedMarks the related commission as Refunded, removing it from the payout queue.
payment_intent.payment_failedNo commission is created. Failed payments are ignored.
payment_intent.canceledNo commission is created. Canceled payments are ignored.

Coupon & discount code tracking

If a customer uses a Stripe coupon or discount code associated with an affiliate, AFFY can attribute the conversion to that affiliate — even without a tracking cookie. Coupon-based attribution is useful for content creators and influencers who share unique discount codes with their audience.

To enable coupon tracking, the coupon code must be linked to the affiliate in your AFFY settings. When Stripe reports a payment that used the coupon, AFFY identifies the affiliate automatically.

Multi-currency support

If your Stripe account processes payments in multiple currencies, AFFY automatically converts the transaction amount to your base currency when calculating commissions. Conversion rates are applied at the time of the payment event.

How refunds are handled

When a refund is issued in Stripe, AFFY receives the charge.refunded event and automatically marks the related commission as Refunded. The commission is removed from the payout queue and will not be paid out.

If the commission was already marked as Paid before the refund arrives, AFFY will still update the commission status to Refunded. You may need to manually reconcile that payout with your affiliate.

Full refund

The entire commission is reversed.

Partial refund

The commission is proportionally reduced based on the refunded amount.

Refund after approval

Commission status changes to Refunded even if it was previously Approved.

Troubleshooting

A payment happened but no commission was created

The customer may not have been attributed to an affiliate. This happens when a customer pays without previously clicking an affiliate link, or the tracking cookie expired (30-day window). You can create a manual commission from the Payouts section.

Commissions show the wrong amount

Check the commission flow assigned to the affiliate. The commission is calculated based on the flow's rate applied to the Stripe payment amount. If the payment was in a foreign currency, verify the currency conversion is set up correctly.

Stripe shows the webhook as failing

Webhook failures are usually temporary (network issues). Stripe retries failed webhooks automatically. If failures persist, reconnect your Stripe account from Settings → Integration.