Create An Invoice
Creates an invoice. The IRN is generated when omitted. Send buyer instead of customerId to have Spend find or create the customer by TIN. For ERP and accounting-tool sync, also send externalSource + externalId: the call then becomes an idempotent upsert, creating the invoice the first time and updating it on later calls while it is still draft/created. The response message says which happened. Signing stays a separate call to POST /:reference/submit.
Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/e-invoicing/invoices" \ -H "Content-Type: application/json" \ -d '{ "invoiceType": "381", "issueDate": "2024-01-23", "documentCurrency": "NGN", "taxCurrency": "NGN", "supplierData": { "name": "Acme Corporation Ltd.", "email": "contact@acmecorp.com", "phoneNumber": "+2348012345678", "tin": "12345678-0001", "country": "NG", "address": "123 Main Street, Victoria Island", "postcode": "023401" }, "items": [ { "description": "Web Development Services", "unit": "Hour", "unitPrice": 5000 } ] }'{
"id": "123e4567-e89b-12d3-a456-426614174000",
"businessId": "123e4567-e89b-12d3-a456-426614174000",
"businessState": "live",
"invoiceNumber": "INV-2024-001",
"systemInvoiceNumber": "DUP00000001",
"invoiceReferenceNumber": "DUP00000001-2A3A045D-20240123",
"invoiceType": "381",
"issueDate": "2024-01-23",
"taxPointDate": "2024-01-23",
"documentCurrency": "NGN",
"taxCurrency": "NGN",
"paymentStatus": "pending",
"billingReferences": [
{
"irn": "ITW001-E9E0C0D3-20240619",
"issueDate": "2024-05-14"
}
],
"customer": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"businessId": "f3f3c6a1-45e3-44aa-b05a-1fbe98d52d09",
"reference": "CUST_INV_ABC123XYZ456",
"modules": [
"invoice"
],
"firstName": "John",
"lastName": "Doe",
"email": "customer@example.com",
"phone": "+2348098765432",
"tin": "98765432-0001",
"country": "Nigeria",
"state": "Lagos",
"city": "Yaba",
"address": "456 Market Street, Yaba",
"postcode": "023401",
"createdAt": "2024-01-23T10:00:00.000Z",
"updatedAt": "2024-01-23T10:00:00.000Z"
},
"customerId": "123e4567-e89b-12d3-a456-426614174000",
"supplierData": {
"name": "Acme Corporation Ltd.",
"email": "contact@acmecorp.com",
"phoneNumber": "+2348012345678",
"tin": "12345678-0001",
"country": "Nigeria",
"state": "Lagos",
"city": "Ikeja",
"address": "123 Main Street, Victoria Island"
},
"payeeData": {
"name": "Payee Corporation Ltd.",
"email": "payee@example.com",
"phoneNumber": "+2348011111111",
"tin": "11111111-0001",
"country": "Nigeria",
"state": "Lagos",
"city": "Ikeja",
"address": "789 Payee Street, Victoria Island"
},
"taxRepresentativeData": {
"name": "Tax Representative Corporation Ltd.",
"email": "taxrepresentative@example.com",
"phoneNumber": "+2348011111111",
"tin": "11111111-0001",
"country": "Nigeria",
"state": "Lagos",
"city": "Ikeja",
"address": "999 Tax Rep Street, Victoria Island",
"postcode": "023401"
},
"billingData": {
"name": "Donsoft Ltd",
"tin": "12345678-0001",
"email": "accounts@example.com",
"phoneNumber": "+2348011111111",
"country": "NG",
"state": "Lagos",
"city": "Lagos",
"address": "Salvation Avenue Abule Ado",
"postcode": "102102"
},
"shippingData": {
"name": "Donsoft Warehouse",
"tin": "12345678-0001",
"email": "logistics@example.com",
"phoneNumber": "+2348011111111",
"country": "NG",
"state": "Lagos",
"city": "Lagos",
"address": "Salvation Avenue Abule Ado",
"postcode": "102102"
},
"invoiceLineItems": [
{
"lineNumber": 1,
"description": "Web Development Services",
"quantity": 40,
"unitPrice": 5000,
"unit": "Hour",
"itemAmount": 200000,
"taxes": [
{
"name": "STANDARD_VAT",
"rate": 7.5,
"amount": 15000
}
],
"taxAmount": 15000,
"lineTotalExcludingTax": 200000,
"lineTotalIncludingTax": 215000
}
],
"discountData": {
"type": "percentage",
"value": 0.1,
"amount": 21500
},
"subtotalAmount": 450000,
"taxTotal": 33750,
"allowanceTotal": 0,
"chargeTotal": 0,
"totalAmount": 435375,
"amountDue": 435375,
"status": "draft",
"firsStatus": "pending",
"firsRejectionReason": "invalid auth credentials",
"qrCodeData": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"qrCodeImageUrl": "https://bucket.s3.region.amazonaws.com/business-1/invoice-qr-codes/key.png",
"qrCodeValue": "kT3c9w...base64...",
"direction": "outbound",
"incomingAction": "pending",
"incomingActionAt": "2026-06-10T11:32:00Z",
"incomingRejectionReason": "Incorrect line item amounts; please re-issue.",
"transmissionStatus": "not_sent",
"notes": "Payment due within 30 days",
"paymentTerms": "Payment due within 30 days",
"paymentDetails": {
"type": "local",
"accountName": "Acme Corporation Ltd.",
"accountNumber": "1234567890",
"bankName": "Wema Bank"
},
"paymentDate": "2026-01-15",
"createdAt": "2024-01-23T10:00:00Z",
"updatedAt": "2024-01-23T10:00:00Z",
"auditLog": [
{
"id": "b3f0…",
"action": "INVOICE_CREATED",
"attributes": {
"invoiceReferenceNumber": "DBQ-0001-X-20260609",
"lineCount": 1
},
"failureReason": null,
"profileId": "d841…",
"createdAt": "2026-06-09T13:39:03.275Z"
}
]
}How is this guide?
Last updated on