Payment provider webhooks handle payment events. They do not capture customer signups. To attribute customers at the moment they register—before they pay—add the
customer-created API call to your signup flow as well. See API Integration for details.How it works
- You add Refairn’s webhook URL as an endpoint in your payment provider dashboard.
- You select the events Refairn needs to receive.
- Your payment provider sends those events to Refairn whenever they occur.
- Refairn verifies the event signature, looks up the customer’s agent attribution by email, and triggers commission logic.
{provider} with your payment provider’s name (lowercase) and {businessId} with your Refairn business ID, found in Settings → Integrations in your dashboard.
Provider setup
- Stripe
- Paystack
- Flutterwave
- Paddle
- LemonSqueezy
Stripe is the most common payment provider for SaaS businesses. Refairn supports the full Stripe webhook event set for subscription lifecycle management.Your webhook URL:Events to enable:
Setup steps:
1
Open your Stripe Dashboard
Log in to dashboard.stripe.com and navigate to Developers → Webhooks.
2
Add an endpoint
Click Add endpoint. Paste your Refairn webhook URL:
3
Select events
Under Events to send, add the following events:
checkout.session.completedinvoice.payment_succeededcustomer.subscription.deletedcharge.refundedcharge.dispute.created
4
Save and verify
Click Add endpoint. Stripe will show a signing secret—Refairn uses this automatically to verify that events are genuinely from Stripe. You do not need to configure this secret in Refairn.
5
Send a test event
Use Stripe’s Send test webhook button to fire a
checkout.session.completed event. Check your Refairn dashboard under Customers to confirm the event was received and processed.What happens after a webhook arrives
When Refairn receives a webhook from your payment provider, it:- Verifies the signature using the provider’s signing mechanism to confirm the event is authentic.
- Extracts the customer email from the event payload.
- Looks up the agent attribution for that email in your Refairn program.
- Creates or updates a commission record based on your program’s commission rules.
- Applies the hold period before the commission is eligible for approval and payout.
Automated payout disbursement—where Refairn initiates transfers directly to agent bank or mobile money accounts after commissions are approved—is planned for a future release. Today, approved commissions appear in your payout ledger and you initiate disbursements manually from the dashboard.