Skip to content

Invoices · Create invoice

Create an invoice

Create an invoice with customer details, line items, tax totals, monetary totals, and payment means.

POST
/api/v1/organizations/{organizationReference}/invoices/posBearer token · X-Client-Id

How creation works

Authenticate with the bearer token from POST /api/v1/organizations/pos/authenticate (see Access token) and send the X-Client-Id header. Invoices created this way are automatically sent for validation and submission. The spec does not mark any request field as required, so validity is decided by the backend. Send only the fields you have real values for: leave the others out rather than filling them with dummy text. The NRS flow itself needs complete data, so send real values for the fields below.

Headers and path

FieldTypeDescription
AuthorizationheaderBearer <access_token> from POST /api/v1/organizations/pos/authenticate.
X-Client-IdheaderThe organization's client identifier.
Content-Typeheaderapplication/json
organizationReferencepathThe organization the invoice belongs to.

Invoice fields

All keys are camelCase, except allowance_charges.

FieldTypeDescription
invoiceDate, dueDate, taxPointDate, actualDeliveryDatedateyyyy-MM-dd.
invoiceTimestringTime of issue.
reference, title, note, invoiceFooterstringFree text.
invoiceKind, invoiceTypeCodestringPlain strings in the spec (no enum). The web app sends invoiceKind in lowercase.
documentCurrencyCode, taxCurrencyCodestringCurrency codes, for example NGN.
paymentStatusenumPENDING, PAID or REJECTED.
paymentTermsNote, buyerReference, orderReferencestringCommercial references.
accountingCostnumberAccounting cost.
deliveryPeriodobject{ startDate, endDate }.
legalMonetaryTotalobjectlineExtensionAmount, taxExclusiveAmount, taxInclusiveAmount, payableAmount (numbers).
taxTotalsarray{ taxAmount, taxSubtotals[{ taxableAmount, taxAmount, taxCategory{ categoryId, percent } }] }.
paymentMeansarray{ paymentMeansCode, paymentDueDate }.
allowance_chargesarray{ amount, charge_indicator }. This one key is snake_case.
accountingSupplierPartyobjectsupplierName, supplierAddress, supplierTin, email, telephone, businessDescription, postalAddress.

Customer fields

Customer details are flat fields on the invoice, not a nested object.

FieldTypeDescription
customerNamestringCustomer name.
customerEmailstring (email)With customerTin, used to link the customer record.
customerTinstringCustomer tax identification number.
customerAddress, customerPhonestringContact details.
vatNumber, businessDescriptionstringOptional customer details.
customerTypeenumBUSINESS, INDIVIDUAL or GOVERNMENT.
postalAddressobjectstreetName, cityName, postalZone, country, state, lga.

Line items

FieldTypeDescription
invoicedQuantityintegerQuantity invoiced.
lineExtensionAmountnumberLine total before tax.
itemobject{ name, description, sellerItemIdentification }.
priceobject{ priceAmount, priceBaseQuantity, currencyUnit (NGN, USD, EUR or GBP), priceUnit }.
hsnCode, isicCodestringClassification codes.
productCategory, serviceCategorystringCategories.
discountRate, feeRatenumber (float)Rates. The web app sends discountRate as a fraction (10% as 0.1).
discountAmount, feeAmountnumberAbsolute amounts.

Send the amounts yourself

Totals are plain numbers in the request (decimal NGN amounts, not minor units). The web app computes lineExtensionAmount, taxTotals and legalMonetaryTotal before sending.

Document references

dispatchDocumentReference, receiptDocumentReference, originatorDocumentReference and contractDocumentReference are single objects; billingReferences and additionalDocumentReferences are arrays of the same object.

FieldTypeDescription
invoiceNumberstringThe referenced IRN or invoice number.
issueDatedateyyyy-MM-dd.

IRN normalisation

The web app uppercases the reference and strips everything except A-Z, 0-9 and hyphen, because NRS requires IRNs in that form. References that end up empty are omitted from the request. Do the same in your integration.

Success response

A successful request returns 200 with the standard envelope; data is an InvoiceResponse.

FieldTypeDescription
data.idstringInvoice identifier; use it to retrieve, update or delete the invoice.
data.statusenumInvoice status; a new invoice starts as DRAFT in the example.
data.paymentStatusenumPENDING, PAID or REJECTED.
data.legalMonetaryTotalobjectTotals as stored.
data.lineItems, taxTotals, paymentMeansarrayStored lines and taxes.
data.customerRecordobjectLinked customer record.
data.creationSourceenumWEB, POS or ERP.
data.dateCreated, dateUpdateddate-timeAudit timestamps.

200 OK

Keep data.id. Use it to retrieve the invoice with GET /invoices/pos/{invoiceId}.

Errors

FieldTypeDescription
400Bad RequestMalformed or invalid request.
401UnauthorizedMissing or invalid bearer token.
403ForbiddenCaller is not permitted to create invoices.
404Not FoundOrganization does not exist.
409ConflictRequest conflicts with existing data.
500Server ErrorUnexpected server error.

Error bodies use the same envelope with a string data field.

Coming soon Soon

Idempotency keys

Safe retries with an Idempotency-Key header are planned. The API does not accept or require one today.

Retrieve invoice and List invoices.