Invoices
Create, send, and track invoices with M-Pesa payment integration.
Create an Invoice from the Merchant Panel
You don't need code to create or send invoices. Log in to your PayNexus merchant panel and manage everything from the dashboard:
Sign in to your merchant account
Go to /login and sign in to your PayNexus merchant panel.
Create an invoice
In the merchant panel, open Invoices and click Create Invoice.
Add customer and line items
Enter the customer name, email, phone number, currency, line items, and due date. You can also set a fixed amount or let the customer pay any amount.
Send the invoice
Use the Send Invoice action to email the invoice directly to your customer with a Pay Now button. The customer pays via M-Pesa without needing a website or API integration.
Track payment status
Monitor statuses from the panel: Draft, Sent, Paid, Overdue, and Partial.
The merchant panel is the easiest way to create, send, and manage invoices. Use the API only if you need to integrate invoicing into your own system.
Create Invoice (API)
Use the REST API only if you want to create invoices programmatically from your own application:
curl -X POST "https://paynexus.co.ke/api/invoices" \
-H "X-API-Key: sk_your_secret_key_here" \
-H "Content-Type: application/json" \
-d '{
"customer_name": "John Doe",
"customer_phone": "0746990866",
"amount": 1500,
"description": "Consulting Services",
"due_date": "2026-01-30"
}'
List Invoices
curl -X GET "https://paynexus.co.ke/api/invoices" \
-H "X-API-Key: pk_your_public_key_here"
Get Invoice
curl -X GET "https://paynexus.co.ke/api/invoices/INV-001" \
-H "X-API-Key: pk_your_public_key_here"
Send Invoice
Send an invoice to the customer via SMS or email:
curl -X POST "https://paynexus.co.ke/api/invoices/INV-001/send" \
-H "X-API-Key: sk_your_secret_key_here" \
-H "Content-Type: application/json" \
-d '{"channel": "sms"}'
Invoice Status
| Status | Description |
|---|---|
draft | Invoice created but not sent |
sent | Invoice sent to customer |
paid | Payment received via M-Pesa |
overdue | Past due date, not paid |
cancelled | Invoice cancelled |