K

Connect Your Payment Provider

Learn how to connect your payment provider to automatically track purchases and calculate affiliate commissions.

Emil Klitmose

Written by Emil Klitmose

Updated recently

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:

  1. Click “Connect Stripe” in your program settings
  2. Authorize the OAuth connection in Stripe
  3. Add our tracking script to your website
  4. Pass the referral code to Stripe metadata when creating checkout sessions
  5. 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:

  1. Add our tracking script to your website
  2. Pass the referral code to your payment provider's checkout (in custom_data, metadata, or notes)
  3. Get your API key from Dashboard → Account & Billing
  4. Set up a webhook handler in your backend
  5. 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.