Dodo Payments
Set up Dodo Payments, a merchant of record for card payments, with refunds, disputes and subscriptions.
Dodo Payments is a merchant of record: it sells to the player, handles tax and pays you out. It supports refunds, disputes and subscriptions, in a long list of currencies.
| Gateway id | dodopayments |
| Refund by API | Yes |
| Recurring | Yes, for durations of whole days, up to 3650 days. Subscription prices must be at least 1 USD or the same in another currency |
| Status lookup | Yes |
| Disputes | Yes |
| Webhook | You add it in the Dodo dashboard |
Setup
Get an API key
Create an API key with write access in the Dodo dashboard. A test key only works with sandbox: true and a live key only with sandbox: false.
Add the webhook
In the Dodo dashboard (Developer, Webhooks), add an endpoint at <webhook.public-base-url>/webhook/dodopayments, tick these events, and copy its signing secret:
payment.succeeded, payment.processing, refund.succeeded, dispute.opened, dispute.accepted, dispute.expired, dispute.lost, subscription.cancelled, subscription.expired, subscription.on_hold, subscription.updated, subscription.failed
Fill in config.yml
dodopayments:
enabled: true
icon: GLOW_INK_SAC
currency: ""
# API key from your Dodo Payments dashboard
api-key: "..."
# Secret of the webhook registered for this plugin
webhook-secret: "whsec_..."
# Use the Dodo Payments test mode instead of live
sandbox: trueRun /store admin reload. A signing secret that cannot be read is named in the console at startup, and every webhook is refused until it is fixed.
Good to know
- Keep the server clock right. Webhooks more than five minutes off your server clock are rejected.
- Products are created for you, one per price, currency and billing cycle, with tax included and purchasing power parity off, so the player pays exactly the in-game price. A restart can create a second product for the same price.
- Local currency and Dodo discount codes are turned off on the checkout page, so the player always pays the order's own amount.
- A failed or cancelled card attempt does not close the order, because the buyer can try again on the same page. The Dodo page stays open for 24 hours. A payment after Emberstore expired the order goes to Needs review.
- Subscriptions bill every n weeks for whole weeks, otherwise every n days, and run for at most 10 years. Cancelling lets the paid period run out.
- Partial refunds made in the dashboard are ignored.