Skip to main content

Invoices

Create, send, and manage invoices. Invoices support partial payments and full lifecycle tracking via webhooks.


List Invoices

GET /invoices/

Headers

FieldDescription
AuthorizationBearer your API key

Query Parameters

TypeRequiredDescription
pageNoPage number to fetch (default: 1)
per_pageNoNumber of records per page (default: 20)
statusNoFilter by draft, sent, paid, partially_paid, or overdue
qNoSearch invoice title, invoice number, or customer name/email
curl -X GET https://sandbox.payscribe.ng/api/v1/invoices/?page=1&per_page=20 \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY"

Response

{
"status": true,
"description": "Invoices fetched.",
"message": {
"details": {
"invoices": [{
"id": "inv_abc123",
"invoice_no": "INV-2026-00001",
"title": "August design services",
"description": "Monthly product design retainer",
"currency": "NGN",
"total_amount": 50000,
"paid_amount": 0,
"status": "draft",
"issue_date": "2026-08-01",
"due_date": "2026-08-15",
"customer": {"id": "cus_abc123", "name": "John Doe", "email": "customer@example.com"},
"created_at": "2026-08-01 09:12:00"
}],
"total": 1,
"page": 1,
"per_page": 20
}
},
"status_code": 200
}

Create Invoice

POST /invoices/

Headers

FieldDescription
AuthorizationBearer your API key
Content-Typeapplication/json

Parameters

TypeRequiredDescription
customer_idstringYes
currencystringYes
itemsarrayYes
titlestringNo
descriptionstringNo
issue_datestringNo
due_datestringNo
po_numberstringNo
discount_amountnumberNo
tax_amountnumberNo
shipping_amountnumberNo
allow_partialbooleanNo
post_typestringNo

Each item can include description, quantity, unit, rate, line_discount_amount, and line_tax_amount.

curl -X POST https://sandbox.payscribe.ng/api/v1/invoices/ \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cus_abc123",
"title": "August design services",
"currency": "NGN",
"description": "Monthly product design retainer",
"issue_date": "2026-08-01",
"due_date": "2026-08-15",
"allow_partial": false,
"post_type": "draft",
"items": [{"description": "Product design retainer", "quantity": 1, "unit": "month", "rate": 50000}]
}'

Response

{
"status": true,
"description": "Invoice created successfully.",
"message": {
"details": {
"id": "inv_abc123",
"invoice_no": "INV-2026-00001",
"status": "draft",
"total_amount": 50000,
"currency": "NGN"
}
},
"status_code": 200
}

Get Invoice

GET /invoices/{id}

Headers

FieldDescription
AuthorizationBearer your API key

Path Parameters

TypeRequiredDescription
idstringYes
curl -X GET https://sandbox.payscribe.ng/api/v1/invoices/inv_abc123 \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY"

Response

{
"status": true,
"description": "Invoice fetched.",
"message": {
"details": {
"id": "inv_abc123",
"invoice_no": "INV-2026-00001",
"title": "August design services",
"description": "Monthly product design retainer",
"currency": "NGN",
"total_amount": 50000,
"paid_amount": 0,
"status": "draft",
"issue_date": "2026-08-01",
"due_date": "2026-08-15",
"po_number": null,
"allow_partial": false,
"sent_at": null,
"paid_at": null,
"created_at": "2026-08-01 09:12:00",
"customer": {"id": "cus_abc123", "name": "John Doe", "email": "customer@example.com", "phone": "+2348012345678", "address": "12 Admiralty Way, Lekki"},
"items": [{"position": 1, "description": "Product design retainer", "quantity": 1, "unit": "month", "rate": 50000, "line_discount_amount": 0, "line_tax_amount": 0, "amount": 50000}],
"transactions": [],
"business": {"id": "b_abc123", "name": "Acme Ltd", "address": "12 Admiralty Way, Lekki", "logo_url": "https://res.cloudinary.com/.../logo.png"},
"payments": {
"wallets": {
"is_enabled": true,
"mode": {
"payscribe": {"title": "Pay with your Payscribe wallet", "meta": []},
"palmpay": {"title": "Connect and pay with your Palmpay wallet", "meta": []}
}
},
"ussd": {"is_enabled": true, "mode": []},
"bank_transfer": {"is_enabled": true, "mode": []}
}
}
},
"status_code": 200
}

transactions is empty until a payment is recorded against the invoice. Once populated, each entry has the shape {"id": "...", "amount": 25000, "description": "...", "remark": "...", "status": "success", "created_at": "...", "updated_at": "..."}.


Update Invoice

PATCH /invoices/{id}

Headers

FieldDescription
AuthorizationBearer your API key
Content-Typeapplication/json

Path Parameters

TypeRequiredDescription
idstringYes

Parameters

TypeRequiredDescription
customer_idstringYes
currencystringYes
itemsarrayYes
titlestringNo
due_datestringNo
descriptionstringNo
po_numberstringNo
discount_amountnumberNo
tax_amountnumberNo
shipping_amountnumberNo
allow_partialbooleanNo

Although this uses PATCH, the current API rewrites every omitted field on this list with a default (an omitted customer_id is written back as null, unlinking the invoice's customer). Send customer_id, currency, and items with every update. A paid or cancelled invoice cannot be updated (400 A paid or cancelled invoice cannot be edited.).

curl -X PATCH https://sandbox.payscribe.ng/api/v1/invoices/inv_abc123 \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cus_abc123",
"title": "August design services",
"currency": "NGN",
"description": "Monthly product design retainer",
"issue_date": "2026-08-01",
"due_date": "2026-09-01",
"allow_partial": false,
"items": [{"description": "Product design retainer", "quantity": 1, "unit": "month", "rate": 75000}]
}'

Response

{
"status": true,
"description": "Invoice updated.",
"message": {
"details": {
"id": "inv_abc123",
"invoice_no": "INV-2026-00001",
"status": "draft",
"total_amount": 75000,
"currency": "NGN"
}
},
"status_code": 200
}

Send Invoice

Triggers an email to the customer with a payment link.

POST /invoices/{id}/send

Headers

FieldDescription
AuthorizationBearer your API key

Path Parameters

TypeRequiredDescription
idstringYes
curl -X POST https://sandbox.payscribe.ng/api/v1/invoices/inv_abc123/send \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY"

Response

{
"status": true,
"description": "Invoice sent to customer.",
"message": {"details": []},
"status_code": 200
}

Delete Invoice

DELETE /invoices/{id}

Headers

FieldDescription
AuthorizationBearer your API key

Path Parameters

TypeRequiredDescription
idstringYes

A paid invoice cannot be deleted (400 A paid invoice cannot be deleted.).

curl -X DELETE https://sandbox.payscribe.ng/api/v1/invoices/inv_abc123 \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY"

Response

{
"status": true,
"description": "Invoice deleted.",
"message": {"details": []},
"status_code": 200
}

Webhooks

EventDescription
invoice.sentInvoice emailed to customer
invoice.paidInvoice paid in full
invoice.partially_paidPartial payment received
invoice.overduePast due date without full payment

See Webhooks for payload format and verification.

Was this page helpful?

Report a docs issue →