Skip to main content
Tolt reads payments straight from your Stripe account through the Tolt app. You pass the referral to Stripe once, at checkout. From then on, every charge, renewal, trial and refund from that customer is matched to the partner and turned into commissions automatically.
Browsertolt.js
Your servercheckout
Stripepayments
Toltattribution
1?ref=sam
2tolt_referral: clk_3nVb…
3metadata.tolt_referral
4charge.succeeded
5commission for Sam

Install the Tolt app

1

Find Tolt on the Stripe App Marketplace

Open marketplace.stripe.com/apps/tolt and click Install from partner. It takes you to Tolt to finish connecting. You can also start inside Tolt, under Settings → Integrations → Stripe.The Tolt app on the Stripe App MarketplaceThe Tolt app on the Stripe App Marketplace
2

Approve access in Stripe

In Tolt, click Install the Tolt app. Stripe shows what the app can access. Approve it and Stripe sends you back to Tolt. Access is read-only, except coupons and promotion codes, which Tolt creates for partner discount codes.
3

You're connected

The Stripe integration page now shows a Disconnect button, and payments start syncing right away. Stay on this page for the next part: passing the referral to Stripe.The Stripe integration page in Tolt, connectedThe Stripe integration page in Tolt, connected
With Stripe connected, Tolt records payments for you. Don’t also call POST /v2/transactions for the same charges, or commissions double count.

Pass the referral to Stripe

Add tolt.js to every page of your site and app. It records the click and exposes the referral as window.tolt_referral. Then hand it to Stripe with whatever you use to take payments.
Send the referral from the browser to your server:
Browser
Then put it on the session as metadata.tolt_referral:
Tolt matches Stripe checkouts through the Stripe customer, and subscriptions always create one. For one-time payments, make sure a customer is created too: customer_creation: "always" on a Checkout Session, or the customer-creation option on a Payment Link (Buy Buttons use Payment Links). A guest checkout without a customer can’t be credited to a partner.

How Tolt finds the partner

Every Stripe payment is checked against a fixed list of signals, in order. The first one that matches decides the partner. If none match, the payment isn’t a referral and Tolt ignores it.

Metadata keys

Put one of these keys in Stripe metadata. Pick whichever id you have at hand. tolt_click, tolt_partner_id and tolt_partner_external are accepted as aliases. If one object has several keys, Tolt uses tolt_customer first, then tolt_referral, then the partner keys. With a partner key and no existing customer, Tolt creates the customer as a lead for that partner.

Where to put them

Without metadata

  • client_reference_id: Checkout, Payment Links, Pricing Tables and Buy Buttons accept it, and tolt.js can set it for you. It must be the click id from window.tolt_referral.
  • Email: if the Stripe customer’s email matches a customer already in Tolt, from tolt.signup() or the API, the payment goes to that customer’s partner. Nothing to set up, as long as your app and Stripe use the same email.
  • Promotion codes: a promotion code that belongs to a partner in Tolt credits that partner, even without a click. See Promo codes.

Lookup order

For every payment, Tolt asks these questions in order and stops at the first yes. If every answer is no, the payment isn’t a referral.
  1. Has Tolt matched this Stripe customer before? Then it’s the same partner as last time. This is how renewals are credited.
  2. Does the Stripe customer have Tolt metadata? tolt_referral, tolt_customer or a partner key on the customer.
  3. Does the payment itself have Tolt metadata? The same keys on the charge, subscription or checkout session.
  4. Does the checkout have a client_reference_id? Checkout Sessions, Payment Links, Pricing Tables and Buy Buttons only.
  5. Does the email match a customer in Tolt? One created earlier by tolt.signup() or the API.
  6. Was a partner’s promotion code used? On the invoice, subscription or checkout.
Once a payment matches, Tolt saves the Stripe customer id. Every later payment from that customer stops at question 1, so renewals keep going to the same partner, even if the metadata is removed.

What Tolt syncs

The app listens to these Stripe events. Nothing to configure.

See it in Tolt

Each payment shows up under Customers → Transactions a few seconds after Stripe confirms it, and you can search the list by its Stripe charge id. Commissions follow under Commissions. Stripe payments listed as transactions in Tolt Stripe payments listed as transactions in Tolt
Stripe test mode isn’t synced, and the app can’t be installed in a sandbox. Test with a small live purchase through a partner link, then refund it to see the commission reverse.

Details

A trial makes the customer trialing in Tolt, linked to the partner. No transaction or commission until the first paid invoice, which arrives as a normal charge.succeeded.
By default the tracked amount is what Stripe captured: after discounts, including tax. Turn on Exclude Stripe tax in the tracking amount on the integration page to use the invoice total before tax instead.
Payments in another currency are converted to your program currency at the latest exchange rate. The transaction keeps both the original and the converted amount.
Add metadata.tolt_handle = "exclude" to a charge and Tolt ignores it. Useful for internal or manual charges.
Uninstall the Tolt app in Stripe and Tolt disconnects automatically. If you click Disconnect in Tolt instead, also remove the app under Settings → Installed apps in Stripe.