API referenceInvoices
Get an invoice
GET
api-keyheader
x-api-key<token>Your API key: ck_test_... for test mode, ck_live_... for live. Send it with x-api-secret (or Authorization: Bearer ).
id*stringx-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- response
id*stringenvironment*stringValue in
"SANDBOX""LIVE"invoiceNumber*stringstatus*stringValue in
"DRAFT""SENT""VIEWED""PAID""OVERDUE"customerName*stringcustomerEmail*stringFormat
emailcustomerPhoneNumber*string|nullbillingAddress*|nullissuer*Immutable business identity and address captured when the invoice was created.
currency*stringsubtotalMinor*stringtaxMinor*stringdiscountMinor*stringtotalMinor*stringdescription*string|nulldueAt*|Format
date-timesentAt*|Format
date-timepaidAt*|Format
date-timepaymentLink*|nullitems*array<>createdAt*stringFormat
date-timeupdatedAt*stringFormat
date-timecurl -X GET 'https://api.creddot.com/api/v1/invoices/string' \ -H 'x-idempotency-key: string'Example Response
{ "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"}