Create an invoice draft
api-keyx-api-key<token>Your API key: ck_test_... for test mode, ck_live_... for live. Send it with x-api-secret (or Authorization: Bearer ).
x-api-secret?stringRecommended: API secret sent over HTTPS. You may send it as Authorization: Bearer instead. If supplied, x-timestamp and x-signature are not required.
x-timestamp?stringLegacy signed mode: Unix time in milliseconds; maximum clock skew five minutes.
x-signature?stringLegacy signed mode: HMAC-SHA256(secret, timestamp.METHOD.url.idempotencyKey.bodyHash).
x-idempotency-key*string1–128 letters/digits or ._:-. Same key and payload replay for 24 hours; conflicting, in-flight, or expired keys return 409. Never change a key to retry an uncertain payment.
application/json- body
invoiceNumber*stringUnique within this business and environment.
length <= 80customerName*stringlength <= 120customerEmail*stringemailcustomerPhoneNumber?|Customer phone number in international E.164 format.
billingAddress?|nullOptional customer billing address printed on the invoice.
currency?string"NGN"items*array<>1 <= items <= 100taxMinor?stringNon-negative integer minor units.
"0"discountMinor?stringNon-negative integer minor units. Cannot exceed subtotal plus tax.
"0"dueAt?stringOptional payment due date. It must be in the future.
date-timedescription?stringlength <= 5000application/json- response
id*stringenvironment*string"SANDBOX""LIVE"invoiceNumber*stringstatus*string"DRAFT""SENT""VIEWED""PAID""OVERDUE"customerName*stringcustomerEmail*stringemailcustomerPhoneNumber*string|nullbillingAddress*|nullissuer*Immutable business identity and address captured when the invoice was created.
currency*stringsubtotalMinor*stringtaxMinor*stringdiscountMinor*stringtotalMinor*stringdescription*string|nulldueAt*|date-timesentAt*|date-timepaidAt*|date-timepaymentLink*|nullitems*array<>createdAt*stringdate-timeupdatedAt*stringdate-timecurl -X POST 'https://api.creddot.com/api/v1/invoices' \ -H 'x-idempotency-key: string' \ -H 'Content-Type: application/json' \ -d '{ "invoiceNumber": "INV-2026-001", "customerName": "Ada Okafor", "customerEmail": "ada@example.com", "items": [ { "description": "Product design retainer", "quantity": 2, "unitAmountMinor": "250000" } ]}'{ "id": "string", "environment": "SANDBOX", "invoiceNumber": "string", "status": "DRAFT", "customerName": "string", "customerEmail": "user@example.com", "customerPhoneNumber": "+2348012345678", "billingAddress": { "addressLine1": "string", "addressLine2": "string", "city": "string", "state": "string", "postalCode": "string", "countryCode": "NG" }, "issuer": { "name": "string", "email": "user@example.com", "address": { "addressLine1": "string", "addressLine2": "string", "city": "string", "state": "string", "postalCode": "string", "countryCode": "NG" } }, "currency": "string", "subtotalMinor": "500000", "taxMinor": "37500", "discountMinor": "0", "totalMinor": "537500", "description": "string", "dueAt": "2019-08-24T14:15:22Z", "sentAt": "2019-08-24T14:15:22Z", "paidAt": "2019-08-24T14:15:22Z", "paymentLink": { "id": "string", "slug": "string", "status": "ACTIVE", "checkoutPath": "string" }, "items": [ { "id": "string", "description": "string", "quantity": 0, "unitAmountMinor": "250000", "totalAmountMinor": "500000" } ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}