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 and no completionDeadlineDays. Subscribe to charge.status.updated (see Webhooks). Do not pass this id to /v1/escrows/:id — GET returns 404; deliver, sessions, and other escrow actions return 409 CHARGE_NOT_AN_ESCROW.
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.
string
Who pays the DHMAD fees: seller (default) or buyer. With seller, the payer pays amount and the fees come out of what you receive. With buyer, the fees are added on top of amount and the payer pays both.
array
The payment methods the checkout offers for this charge. Omit it, or send an empty array, to offer every method. Allowed values:
  • paypal_card: debit or credit card, processed by PayPal
  • paypal: PayPal account
  • apple_pay: Apple Pay
  • d17: D17 transfer, with a proof of payment
  • flouci: Flouci transfer, with a proof of payment
  • virement_bancaire: bank transfer, with a proof of payment
  • cash_collection: cash handed to a courier at the payer’s address
Any other value is rejected with 400.The list only narrows what checkout would offer anyway. Card, PayPal and Apple Pay need the charge to reach the PayPal minimum, and Apple Pay also needs a supported device and browser. Cash collection is only for TND charges paid from Tunisia, within the courier’s amount limits. A payer who is signed in to DHMAD can always pay from their DHMAD wallet.
If none of the methods you list can be offered for a charge (for example only paypal on a charge below the PayPal minimum), a payer without DHMAD wallet funds has no way to pay. Keep a transfer method such as virement_bancaire in the list.

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