What happens during connection
When you click Connect Stripe in the dashboard (or call the API), the flow works like this:Initiate connection
From the dashboard, go to Program Settings > Stripe and click Connect Stripe. You’ll be redirected to Stripe’s authorization page.Alternatively, use the API to get an OAuth URL:The response includes an
authUrl that you open in the browser to start the Stripe OAuth flow.Authorize on Stripe
On the Stripe authorization page, review the permissions AgentRef is requesting and click Connect. If you have multiple Stripe accounts, select the one you want to use for this program.
Permissions AgentRef receives
AgentRef requests read-only access to payment events. Here is exactly what it can and cannot do:| Can do | Cannot do |
|---|---|
| Listen for payment events via webhooks | Process payments on your behalf |
| Read checkout session metadata | Access your bank account or balance |
| Read invoice and subscription data | Create charges or transfers |
| Read refund events | Modify your Stripe settings |
AgentRef uses Stripe Connect in read-only mode. It never touches your funds or payment processing. You can revoke access at any time from your Stripe dashboard under Settings > Connected accounts.
Webhook events AgentRef listens to
Once connected, AgentRef automatically subscribes to these Stripe webhook events:| Event | Purpose |
|---|---|
checkout.session.completed | Captures one-time purchases and new subscriptions from Checkout |
invoice.paid | Tracks recurring subscription payments |
charge.succeeded | Captures direct charges (Payment Intents, legacy charges) |
charge.refunded | Reverses commissions when a refund is issued |
customer.subscription.deleted | Stops recurring commissions when a subscription is canceled |
Disconnect Stripe
If you need to disconnect Stripe from a program:Troubleshooting
| Problem | Solution |
|---|---|
| OAuth flow fails or times out | Check that third-party cookies are enabled in your browser. Some ad blockers interfere with the OAuth redirect. |
| Webhooks not firing | Verify the connection is active in Program Settings > Stripe. If needed, disconnect and reconnect. |
| Conversions not appearing | Check that your tracking script passes agentref_cid metadata to Stripe. See Install Tracking. |
| Multiple Stripe accounts | Each program connects to one Stripe account. Use separate programs for separate Stripe accounts. |
What’s next
Create Program
Configure your commission rates, cookie duration, and program settings.
Install Tracking
Add the tracking script to your website to capture affiliate clicks.