RekomiRekomiBlogPricing
Rekomi Docs
Rekomi Docs
Welcome to Rekomi
Quickstart for brandsPlans and trialsIntegrationsStripe Connect (sales tracking)Organization settingsTeam managementNotifications
Install tracking

Payment platforms

Install on StripeInstall on PaddleInstall on BraintreeInstall on Lemon SqueezyInstall on GumroadInstall on MemberstackInstall on OutsetaInstall on PodiaInstall on TeachableInstall on ThinkificInstall on GhostInstall on beehiivInstall on Kit (ConvertKit)

Site builders

Install on WordPressInstall on ShopifyInstall on WebflowInstall on FramerInstall on SquarespaceInstall on WixInstall on BubbleInstall on Carrd

Frameworks

Install on Vanilla JavaScriptInstall on Next.js App RouterInstall on Next.js Pages RouterInstall on React (Vite, CRA, Remix)Install on VueInstall on RailsInstall on Django

Campaigns and commissions

CampaignsCommission modelsPay per click or lead (CPC & CPL)Coupon-code attributionSub-affiliate recruitingTracking and attribution

Affiliates

Recruit affiliatesManage affiliatesAI co-pilotApply to the curated network

Money flow

SalesPayoutsMulti-currencyTax formsReports

Email

Sending domainBroadcasts
For brandsInstall tracking
|Brands|

Install on Braintree

Connect your Braintree account to Rekomi natively, point a Braintree webhook at Rekomi and paste your API credentials, so recurring sales and chargebacks are tracked automatically with no backend relay.

Braintree logo

Braintree (a PayPal company) is a payment gateway. Rekomi integrates with Braintree natively for subscriptions: you point a Braintree webhook destination at Rekomi and paste read-only API credentials, and every recurring charge is verified and recorded automatically, with no backend relay to build.

A note on scope, stated plainly: Braintree only fires webhooks for subscriptions and disputes, not for one-time card sales or card refunds (that is a Braintree limitation, not a Rekomi one). So this native flow tracks recurring revenue and claws back on chargebacks automatically. For one-time sales, use the server-to-server API; one-time card refunds are handled by denying the commission manually.

Attribution has two halves: the Rekomi script captures the affiliate click on your marketing pages, and you carry that referral into Braintree on a custom field. When Braintree sends the charge to Rekomi, the referral on the transaction is matched to the affiliate.

Not on a recurring Braintree plan? Use the server-to-server API instead, that path relays conversions from your own backend for any checkout.

1. Install the head script

Paste the Rekomi head script in your marketing site's <head>, on every page that can lead to a purchase, so the click is captured before the buyer reaches checkout.

<script>
  (function(){
    var s=document.createElement('script');
    s.src='https://js.rekomi.com/v1/rekomi.js';
    s.async=true;
    s.dataset.programId='YOUR_PROGRAM_ID';
    document.head.appendChild(s);
  })();
</script>

On a no-code builder (Webflow, Framer, Squarespace, etc.), use the platform's custom head-code field. Your program ID is in the dashboard under Settings → Tracking.

2. Create the referral custom field

In the Braintree Control Panel, go to Settings → Processing → Custom Fields and add a custom field with the API name rekomi_ref, set to Store and pass back. This is the field that carries the affiliate's link slug onto each sale.

Then, when your backend creates the subscription (or its first transaction), stamp the referral you captured at checkout onto that custom field:

// the referral is the affiliate's link slug, captured client-side at checkout
const rekomiRef = window.Rekomi && window.Rekomi.getReferral();

// pass it to your backend, then set it on the transaction / subscription:
//   customFields: { rekomi_ref: rekomiRef }

The custom field name must be exactly rekomi_ref. Rekomi reads it off the transaction that Braintree delivers on the subscription webhook.

3. Get your Rekomi webhook URL

In Rekomi, go to Setup → Connect payment processor → Connect Braintree. Rekomi shows a webhook URL unique to your workspace, for example:

https://api.rekomi.com/api/webhooks/braintree/<your-token>

Copy it. This URL is unique to you and is how Rekomi knows which workspace an event belongs to. Keep it private.

4. Create the Braintree webhook destination

In Braintree, go to Settings → Webhooks → Create new webhook and paste the Rekomi webhook URL. Select these notification kinds:

  • subscription_charged_successfully
  • subscription_canceled
  • subscription_expired
  • subscription_went_past_due
  • subscription_charged_unsuccessfully
  • dispute_opened
  • dispute_lost
  • dispute_won
  • dispute_accepted

Save the webhook. Braintree may send a check notification to validate the URL; Rekomi acknowledges it automatically.

5. Paste your API credentials into Rekomi

Create a dedicated read-only user in Braintree (Account → Users) and generate that user's API keys. Read access is all Rekomi needs. Back in Connect Braintree, paste the Merchant ID, Public Key, and Private Key, choose your environment (Production or Sandbox), and click Connect Braintree.

Your keys are validated against Braintree on connect, stored encrypted, and never shown again. From now on, every recurring charge carrying a rekomi_ref is credited to the right affiliate automatically.

Refunds and disputes

Chargebacks are handled automatically: when Braintree sends a dispute_lost event, Rekomi reverses the commission proportionally and updates the affiliate's pending balance.

Voluntary refunds of one-time card sales do not generate a Braintree webhook (a Braintree limitation), so those are handled by denying the affiliate's commission manually from the conversion. Recurring subscription churn (cancel / expire) is tracked automatically.

Quirks worth knowing

The referral lives on the transaction, not the subscription. Braintree subscriptions have limited metadata, so the rekomi_ref custom field must be set on the transaction (or customer) at sale time; Rekomi reads it from the charge transaction delivered on the subscription webhook.

One-time sales use S2S. Braintree fires no webhook for one-time card sales, so track those through the server-to-server API.

One conversion source per workspace. If you also have Stripe Connect or Paddle linked, disconnect it before relying on Braintree so the same sale is never counted twice.

Troubleshooting

A Braintree subscription charge didn't show up in Rekomi. Check four things: the webhook destination includes subscription_charged_successfully, the charge transaction's rekomi_ref custom field carries the affiliate slug, the custom field is set to "Store and pass back" in your Control Panel, and the affiliate is Approved. Braintree's webhook log shows the delivery + Rekomi's response code for each event.

The webhook returns a 401. The stored API credentials are missing, wrong, or were rotated, so the Braintree SDK can't validate the webhook signature against your keys. Re-copy the Merchant ID + keys from your read-only user and reconnect. (A 404 instead means the webhook URL's token is stale, reconnect to get the current URL.)

The connection shows as broken in Rekomi. The API keys were rotated or the read-only user was removed. Re-create the user or re-copy the keys in Braintree, then reconnect on the Connect Braintree page.

Related

  • Server-to-server API reference
  • Multi-currency reporting

Install on Paddle

Connect your Paddle Billing account to Rekomi natively, point a Paddle notification destination at Rekomi and paste the signing secret, so sales and refunds are tracked automatically with no backend code.

Install on Lemon Squeezy

Two attribution paths for Lemon Squeezy checkouts. The redirect-URL trick fires a convert event on a brand-owned thank-you page; the order_created webhook relay handles attribution server-side.

On this page

1. Install the head script2. Create the referral custom field3. Get your Rekomi webhook URL4. Create the Braintree webhook destination5. Paste your API credentials into RekomiRefunds and disputesQuirks worth knowingTroubleshootingRelated