Authorization
default A public key (pk./pk_test.) is accepted on /payments, /customers, /links, /invoices and the catalogue reads (/channels, /providers, /countries, /currencies); anything that moves money out, reads the balance or manages the account answers 406 to it. It is an identifier, never an authorization. Use a secret key (sk./sk_test.) for sensitive operations (transfers, refunds, balance), or a restricted key (rk./rk_test.) scoped to specific permissions. The _test. variant of any key selects the sandbox environment, there is no separate sandbox URL. Never expose your secret key in client-side code.
In: header
Header Parameters
Your key for this request, 1 to 128 characters of letters, digits and `. _ : -`. The same request sent again with the same key returns the first answer instead of doing the work twice. See [Idempotency](/api/idempotency).
Request Body
application/json
One of your own customers, by the `cus_` id the Customers API returns. Their details are copied onto the invoice. Another merchant's customer answers 422.
Make the invoice a recurring template: a draft copy is generated each cycle of `recurring_interval`. Only a `document_type` of `invoice` can recur, and never a copy the series generated: both answer 422.
A currency Wajub supports, as on `POST /payments`. Any other code answers 422.
The language of the invoice's e-mail and PDF: `fr` or `en`. Defaults to the linked customer's preferred language, else your account's language (Settings → Regional → Language), else `en`.
"fr""en"One of the invoice templates set up in the Dashboard, by id.
Restricts the methods the payer is offered on the invoice's page, as on `POST /payments`.
Same as `recurring_interval`, accepted for older integrations: `daily`, `weekly`, `monthly`, `quarterly` or `yearly`.
"daily""weekly""monthly""quarterly""yearly"With a `payment_type` of `split` or `milestone`, the instalments the payer settles one at a time.
The customer's postal address, printed on the invoice.
The customer's company, printed under their name.
Where `POST /invoices/{id}/send` e-mails the invoice and its PDF, and where the Dashboard sends its reminders.
The name printed on the invoice. Required, even with `customer_id`: the customer can be a person or a business you only name.
The customer's phone number, international format.
Defaults to `invoice`. A `quote` or an `estimate` is not returned by the other `/invoices` routes.
"invoice""quote""estimate"On or after `invoice_date`.
Up to 500 characters.
`percentage` (default) or `fixed`.
"percentage""fixed"A percentage, at most 100, or an amount in the major unit of the currency and at most its decimals, by `global_discount_type`. An amount takes off at most the lines' amount.
Apply one discount to the invoice, set by `global_discount_type` and `global_discount_value`: worked out on the lines' amount after their own discounts, and spread over the lines in proportion to it before tax, so tax is charged on what is left (a 100 % discount leaves no tax); shipping is added after it. `false` removes it.
The date printed on the invoice, `YYYY-MM-DD`.
At least one line, at most 200.
Up to 5 000 characters.
Sets `due_date` this many days from today when `due_date` is left out.
`full` (default), `split` or `milestone`.
"full""split""milestone"A shipping cost, in the major unit of the currency and at most its decimals (none for XAF). Added to `total` after the discount, and never taxed.
Lets the payer pay part of the balance on the invoice's page, at least this much at a time; the balance itself can always be paid, even when less than this is left. Above zero, in the currency's unit, at most `total`, and only with a `payment_type` of `full`: otherwise `422`. Leave it out for the balance in one payment. Until partial payments open on Wajub, any minimum answers `422`.
Your own number for the document: up to 32 letters, digits, spaces and `- _ / . #`, starting with a letter or a digit. Shown instead of `invoice_number` on the invoice's page, its PDF and e-mail, the payment's description and its receipt (`display_number`); `invoice_number` is still drawn when you send it. Unique among your documents of the same `document_type`, whatever the case: a number already taken answers `422`, naming the document that has it.
`daily`, `weekly`, `monthly`, `quarterly` or `yearly`.
"daily""weekly""monthly""quarterly""yearly"Up to 5 000 characters.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.wajub.com/invoices" \ -H "Idempotency-Key: invoice-order-1042" \ -H "Content-Type: application/json" \ -d '{ "currency": "XAF", "customer_name": "Amina Diallo", "invoice_date": "2026-09-16", "items": null }'{ "code": 201, "status": "Created", "message": "Invoice created", "invoice": { "id": "inv_Hq7Lm2Xp9Rt4Vb8Nc3Kd", "invoice_number": null, "custom_number": null, "display_number": null, "document_type": "invoice", "status": "draft", "customer": null, "customer_id": null, "customer_name": "Amina Diallo", "customer_email": "amina@example.com", "customer_company_name": null, "customer_phone": null, "customer_address": null, "invoice_date": "2026-09-16", "due_date": "2026-09-30", "currency": "XAF", "language": "fr", "subtotal": 50000, "discount_amount": 0, "tax_amount": 0, "shipping_amount": null, "total": 50000, "amount_paid": 0, "amount_due": 50000, "amount_overpaid": 0, "payment_type": "full", "minimum_payment_amount": null, "is_recurring": false, "recurring_interval": null, "next_invoice_date": null, "recurring_parent": null, "notes": null, "terms": null, "footer": null, "accept": null, "sent_at": null, "paid_at": null, "cancelled_at": null, "items": [ { "id": "9d3f6a2e-4b1c-4e8a-9f27-6c5d8b1a0e43", "name": "Website design", "description": null, "quantity": 1, "unit": null, "unit_price": 50000, "tax_rate": 0, "tax_amount": 0, "discount_type": null, "discount_value": 0, "discount_amount": 0, "subtotal": 50000, "total": 50000, "sort_order": 0 } ], "created_at": "2026-09-16T09:12:04+00:00", "updated_at": "2026-09-16T09:12:04+00:00" }}Draft created