Skip to main content
Create a charge and get a public checkout URL. There is no buyerEmail: anyone who opens the URL can pay it, and DHMAD collects a receipt email from them at checkout. Payment completes the charge and settles the funds into your business wallet in one step — there is no deliver call.
Configure allowed redirect URLs in your Developer Dashboard before creating charges. A redirectUrl that does not match one of them is rejected with 400.

Request Body

string
required
What the payer is paying for. Shown on checkout and on the receipt.
number
required
Amount in the face currency.
string
TND, USD, or EUR. Defaults to TND. Non-TND charges are converted for the internal ledger; the payer is charged the face amount.
string
required
Your own opaque identifier for what is being bought — an order id, a purchase row id, anything you can look up later. Unique per developer and used as the idempotency key. Letters, digits, and . _ : -, up to 200 characters.
string
required
Where the payer returns after paying or abandoning. Must match an allowed redirect URL and use HTTPS (except http://localhost).
string
Prefills the receipt field on checkout. The payer can change it, so never treat it as the identity of the buyer.
object
Key-value pairs (strings only, 500 characters or less per value) carried on the checkout session.

Response Fields

Repeat requests

Calling this endpoint again with a merchantReference you already used returns 200 with the original charge instead of 201, so a retry after a timeout is safe. Use the same call to reissue an expired checkout URL for an abandoned payment.

Errors