Connect Dodo Payments

Point Dodo Payments at Clakta with a webhook so your payments, refunds and chargebacks arrive automatically — and each sale is matched to the visitor who made it.

Dodo Payments does not have a one-click connection, so you introduce the two systems by hand. Clakta gives you a web address, you paste it into Dodo, and Dodo starts sending your sales there.

It takes about five minutes and you only do it once.

Connect

In Clakta:

  1. Open your project and go to Project settings → Sales platforms.
  2. Find Dodo Payments and click Connect.
  3. Give the connection a name you will recognise later, like Main account, then click Create connection.
  4. Copy the Webhook URL that appears. Keep this window open.

In Dodo Payments:

  1. Go to Developer → Webhooks → Add endpoint.

webhooks menu

add endpoint

  1. Paste the URL you copied.
  2. Tick the payment, refund and dispute events (the full list is below), and save.
EventWhy Clakta needs it
payment.succeededRecords the sale.
payment.processingShows a sale that is pending.
payment.failedRecords a failed attempt.
payment.cancelledRecords an abandoned payment.
refund.succeededMarks a sale refunded.
dispute.acceptedChargeback you accepted.
dispute.lostChargeback you lost.
dispute.wonChargeback you won.

Ticking extra events does no harm — Clakta ignores anything it does not use.

add endpoint dialog

  1. Open the endpoint's Overview tab and copy the signing secret Dodo shows there — it starts with whsec_.

copy endpoint secret

Back in Clakta:

  1. Paste the signing secret and click Finish.

add dodo payments dialog

The card now says Added. New sales appear within a few seconds of being paid. Sales from before you connected are not imported.

If you close the window before pasting the secret, nothing is lost. The connection waits as Setup incomplete, and any sale that happens meanwhile is held and delivered once you finish. Reopen it from the card's menu and choose Edit.

Show product names and prices (optional)

By default Clakta records the money and the customer, but not what was bought: Dodo's messages carry product IDs, not names.

To fill that in, add an API key. In Dodo, go to Developer → API Keys, create one, and paste it into the API key (optional) field on the Clakta connection. Clakta then looks up the product names and prices for each sale.

api keys menu

copy api key dialog

Skip this and everything else still works — revenue, customer and source are all recorded either way.

Match sales to the visitors who made them

Recording a sale tells you that you earned money. Matching it to a visitor tells you where that money came from — which ad, which post, which page.

When your code creates the Dodo payment link or checkout, add a metadata field named clakta_session_id and put the visitor's Clakta session in it:

Read that value in the browser with clakta.getSessionId() and send it to your server along with the rest of the checkout request.

Nothing breaks if you skip this. Sales are still recorded with their full revenue — they just show up as unattributed, meaning Clakta knows the money came in but not who brought it.

Test mode and live mode

Dodo keeps test and live separate, and so does Clakta. A webhook you create in test mode only ever receives test sales.

It is perfectly fine to have two connections — one for test, one for live. Give them names that tell them apart, because both will appear on the card.

What Clakta records

  • How much the sale was for, in the currency it was paid in
  • The customer's name, email, phone and city
  • What they bought, if you added an API key
  • How they paid — card, wallet, bank transfer, and so on
  • Whether it was later refunded or charged back
  • Which visitor and which ad it came from, when that is known

Refunds and disputes

Refund a payment in Dodo and the sale is marked refunded in Clakta. Refunding only part of it leaves the sale as paid, because Clakta records each sale as a single amount.

Chargebacks count once they are settled. Accept or lose one and the sale becomes refunded; win it and the sale goes back to paid.

Disconnect

Go to Project settings → Sales platforms, open the menu on the Dodo Payments card, and choose Delete. Dodo's messages stop being accepted immediately.

Delete the endpoint in Dodo too, so it stops trying to reach an address that no longer works.

Sales already recorded stay in Clakta. Disconnecting never deletes your history.

Common questions

Related articles