Two Integration Options
Revshare offers two ways to connect your payment provider. Choose based on which provider you use:
- Stripe Integration — Integration for Stripe users via webhooks. Pass referral metadata in your payments.
- Custom API — Works with any payment provider (Paddle, Lemon Squeezy, Gumroad, Razorpay, PayPal, etc.). Requires calling our API endpoint.
Stripe (Recommended)
If you use Stripe, the Stripe integration tracks affiliate sales through webhooks. You'll need to pass the referral code in your payment metadata.
Here's how it works:
- Click “Connect Stripe” in your program settings
- Authorize the OAuth connection in Stripe
- Add our tracking script to your website
- Pass the referral code to Stripe metadata when creating checkout sessions
- Sales are automatically tracked via webhooks
The Stripe integration handles commission calculation and refund tracking automatically via webhooks. Read the complete Stripe integration guide for detailed setup instructions.
Custom API
For payment providers other than Stripe, use our Custom API integration. This gives you full control over when commissions are recorded and works with any payment provider that supports webhooks.
The integration process:
- Add our tracking script to your website
- Pass the referral code to your payment provider's checkout (in custom_data, metadata, or notes)
- Get your API key from Dashboard → Account & Billing
- Set up a webhook handler in your backend
- When a payment completes, extract the referral code and call our API endpoint
The Custom API works with Paddle, Lemon Squeezy, Gumroad, Razorpay, PayPal, Polar, Dodo, and any custom payment solution. Read the complete Custom API guide for step-by-step instructions and code examples. You can also see detailed API documentation with examples for specific providers.
