Meritt Get started

Through the API

Affiliate program for Razorpay

With Razorpay, your server reports the sale to Meritt through the API, in three calls, as soon as Razorpay 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 notes.
  3. When Razorpay sends you payment.captured, call POST /v1/conversions with the amount, the currency, the click and the customer id.
  4. On refund.processed, 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 Razorpay 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 Razorpay subscriptions?

subscription.charged arrives on each successful charge: report it with the same customer id.

payment.captured or order.paid?

Either, not both: order.paid carries the order and the payment. A sale sent twice with the same reference is counted once anyway.

Razorpay documentation checked on October 19, 2026: razorpay.com › payments, razorpay.com › subscriptions, razorpay.com › refunds, razorpay.com › create

See also

Affiliate program for Razorpay

Free until your first commission. No card asked for.