Stripe
Integrating Stripe with RefRef for payment processing and referral tracking
RefRef offers seamless integration with Stripe to handle payment processing, subscription management, and referral tracking for your programs.
Overview
The Stripe integration enables you to:
- Track purchases and subscriptions as qualifying events
- Process commission payments to referrers and affiliates
- Sync customer data between systems
- Implement revenue sharing models
- Automate reward distribution
Prerequisites
Before setting up the Stripe integration, you'll need:
- An active Stripe account
- API keys from your Stripe dashboard
- Administrator access to your RefRef account
- Basic understanding of Stripe's product structure
Setting Up the Integration
Step 1: Connect Your Stripe Account
- Navigate to Integrations in your RefRef dashboard
- Select Stripe from the available integrations
- Click Connect with Stripe
- Authenticate with your Stripe credentials
- Grant the necessary permissions for RefRef
Step 2: Configure Webhook Events
RefRef needs to listen for specific events from Stripe:
- In the Stripe integration settings, review the webhook configuration
- Ensure the following events are enabled:
checkout.session.completed
invoice.paid
customer.subscription.created
customer.subscription.updated
charge.succeeded
- Save your webhook configuration
Step 3: Map Stripe Products to Qualifying Events
Connect your Stripe products and plans to RefRef qualifying events:
- Go to Qualifying Events in your program settings
- Select Add Stripe Event
- Choose the Stripe products or plans that should trigger referral conversions
- Configure conversion rules and reward values
- Set attribution windows and validation criteria
Tracking Referrals with Stripe
One-time Purchases
For tracking one-time purchases:
- Add the referral identifier to Stripe checkout metadata
- RefRef will automatically attribute the purchase to the referrer
- Configure reward rules based on purchase amount or product
Example code for adding referral data to Stripe checkout:
Subscription Tracking
For subscription-based businesses:
- Configure which subscription events trigger conversions
- Set rules for initial subscription vs. recurring payments
- Define reward structures for subscription tiers
- Establish rules for subscription upgrades or downgrades
Processing Rewards Through Stripe
RefRef can automatically process rewards and commissions through Stripe:
Stripe Connect
For affiliate and partner payments:
- Enable Stripe Connect in your integration settings
- Configure payout schedules and thresholds
- Set up tax form collection if required
- Define commission structures and tiers
Customer Credits and Discounts
For customer rewards:
- Configure customer reward types in RefRef
- Set up automatic discount application
- Define credit application rules for future purchases
- Configure notification templates for reward issuance
Advanced Configuration
Custom Events
Create custom qualifying events based on specific Stripe webhook data:
- Navigate to Custom Events in your integration settings
- Define event criteria using Stripe webhook data
- Set up reward rules for these custom events
- Test the configuration with sample webhook data
Multi-currency Support
For businesses operating in multiple currencies:
- Configure currency settings in your integration
- Set up currency conversion rules
- Define reward values for different currencies
- Establish payout preferences by currency
Webhooks and API
RefRef to Stripe
RefRef can send data to Stripe for:
- Creating promotional codes
- Applying discounts
- Updating customer metadata
- Managing subscription features
Stripe to RefRef
Stripe sends webhook events to RefRef for:
- Purchase confirmation
- Subscription status changes
- Payment success or failure
- Customer updates
Troubleshooting
Common issues and solutions:
- Missing Webhooks: Verify webhook configuration in Stripe
- Attribution Errors: Check referral parameter passing in checkout
- Payout Failures: Verify Stripe Connect account setup
- Duplicate Events: Check webhook configuration for duplicate notifications
Best Practices
- Test the integration thoroughly in Stripe's test mode before going live
- Implement proper error handling for webhook processing
- Regularly audit referral attributions and payouts
- Keep your Stripe API version updated in RefRef
- Monitor webhook delivery and processing in both systems
By leveraging the RefRef-Stripe integration, you can create powerful, automated referral programs that seamlessly track conversions and distribute rewards.