Meritt Get started

Through the API

Affiliate program for Braintree

With Braintree, your server reports the sale to Meritt through the API, in three calls, as soon as Braintree confirms the payment. Attribution and the ledger are the same as for Stripe.

What Meritt reads

Worth knowing

Setting it up

  1. Create an API key under Payment system; the calls are documented on the same screen.
  2. At checkout, read the click cookie on your domain and store it in the transaction's custom_fields.
  3. When Braintree sends you subscription_charged_successfully (or a card sale is approved), call POST /v1/conversions with the amount, the currency, the click and the customer id.
  4. On the response of your refund call, call POST /v1/conversions/reverse with the payment reference.

How long it takes

One key, and two calls added to your webhook handling.

Questions

Why not report the sale at checkout?

At that moment the payment is not confirmed, and when it is, in the webhook, the cookie is gone. The Braintree passthrough field carries the click between the two.

Is a sale reported twice counted twice?

No. With the same reference, the second call answers “already received” and nothing is added.

What about ACH or SEPA debits?

They settle later: transaction_settled signals it, and that is when the sale is reported.

Do subscriptions carry the custom fields?

The subscription creation docs do not mention them. Tie the customer instead: the customer id is enough for renewals to go to the right affiliate.

Braintree documentation checked on October 19, 2026: developer.paypal.com › subscription, developer.paypal.com › transaction, developer.paypal.com › sale

See also

Affiliate program for Braintree

Free until your first commission. No card asked for.