Invoicing

Create invoice

Open a draft invoice. Secret key. JSON body, not RSA-wrapped. Issue it before the customer can pay.

POST/invoice/v1

Same host as Create order (https://payment-api-service.dev.payinvert.com on test). Header api-key is the secret key from the same Credentials set. Also send x-env-id. Send Idempotency-Key so a retry does not create a second draft.

FieldNotes
invoiceTitleShown on the invoice.
customerEmail / customerName / customerPhoneWho the invoice is for. Set customerPhone (E.164) so Pay invoice can open checkout on the first click.
dueDateISO-8601. Example 2026-09-01T00:00:00Z.
currencyISO 4217 code. Sample uses NGN. Same style as Create order.
invoiceTypeprofessional or simple.
taxPercent. Sample uses 7.5.
invoiceItemsEach row has item, amount, quantity. Amounts are major units.
externalReferenceYour ERP or ledger id.
metadataOptional key/value map for your integration.
sendEmailLeave false on create. Issue is what emails the customer.

Flow: create draft โ†’ update if needed โ†’ issue (status unpaid) โ†’ customer pays. PayInvert marks the invoice paid when the order succeeds.

Keep the invoice reference

Later calls use it. The last reference from a test panel is kept on this tab.