Track Stripe payments with the Stripe webhook

Send your Stripe sales to Anderro with a webhook endpoint so referred payments, refunds and disputes update affiliate commissions.

If you take payments with Stripe, Anderro can record referred sales straight from Stripe. You add an Anderro endpoint to your Stripe account, and Stripe sends each payment, refund and dispute to it. Anderro keeps no access to your Stripe account, and it never moves money.

You still pay affiliates yourself. Anderro works out what each affiliate earned; you send the money with your own method and mark the payout paid. Your Anderro subscription is billed separately from the Stripe account that charges your customers.

Set it up

  1. In Anderro, open your product, choose Integrations, then Stripe, and create your webhook URL.
  2. In Stripe, open Developers, then Webhooks. Add an endpoint with that URL and select the seven events Anderro lists.
  3. Copy the endpoint's signing secret from Stripe and paste it into Anderro. Every delivery must carry Stripe's signature for this secret; anything Stripe did not sign is refused.
  4. Install the tracking snippet on every page of your site. It records affiliate clicks and gives each visitor an ID.
  5. Pass that visitor ID to Stripe when your server creates the checkout. Anderro shows you the code to copy.

The setup page shows when Stripe last reached Anderro, so you can confirm the endpoint and secret are right before the first referred sale arrives. Stripe's test mode works too: test events go to a separate test URL and never earn a commission.

Pass the visitor ID

The snippet remembers which affiliate sent a visitor. Your checkout passes that visitor's ID to Stripe, Stripe sends the sale to Anderro, and the affiliate who sent the customer is credited.

  • Stripe Checkout: set metadata.anderro_vid on the Checkout Session. For one-off payments, also set it in payment_intent_data.metadata.
  • Payment Links and pricing tables: add client_reference_id with the visitor ID to the link.
  • Renewals: no extra code. They are matched to the customer from their first payment.

If several of your products share one Stripe account, each payment must name its product with metadata.anderro_product_id, and subscription payments are not recorded. Report those from your own code, or use a separate Stripe account per product.

Refunds and disputes

A full or partial refund reduces the commission by the amount refunded. An opened dispute claws back the whole commission, and a won dispute restores it. When the commission was already paid, the adjustment comes off a later payout. Commissions wait out your hold period before they can be paid, so set the hold at least as long as your refund window. Read payout help if the amount you owe differs from the gross commission total.

If your own code already reports payments or refunds to Anderro, remove those calls so Stripe is the only source.

Limits

  • US dollars only. A payment in another currency is not recorded, and the Integrations page tells you when one arrives.
  • Only sales that came through an affiliate are recorded.
  • Subscriptions created through Stripe's API without a Checkout Session need your own code to report the signup to Anderro.

Turning it off

Turning off the Stripe webhook stops Anderro accepting Stripe events for this product, and sales made while it is off are not credited to affiliates. Commissions already recorded are kept. Remove the endpoint in Stripe as well. This does not cancel your Anderro subscription; manage that in Billing.

More help for businesses