POST /v1/pay/invoices| Field | Type | Required | Description |
|---|---|---|---|
customer_id | string | No* | ID of existing customer |
customer_email | string | No* | Customer email (required if customer_id not provided) |
customer_name | string | No* | Customer name (required if customer_id not provided) |
customer_address | string | No | Customer address |
customer_phone | string | No | Customer phone number in E.164 format |
currency | string | Yes | Currency code (default: "GMD") |
tax_rate | number | No | Tax rate as percentage (0-100, default: 0) |
due_date | string | Yes | Invoice due date (ISO 8601) |
notes | string | No | Additional notes or terms |
items | array | Yes | Invoice items (minimum 1) |
items[].product_id | string | No** | Product ID (auto-fills description and unit_price) |
items[].description | string | No** | Item description (required if product_id not provided) |
items[].quantity | integer | Yes | Item quantity (minimum 1) |
items[].unit_price | string | No** | Unit price as decimal (required if product_id not provided) |
is_draft | boolean | No | Create as draft (default: false) |
metadata | object | No | Custom metadata |
customer_id or customer_email+customer_name requiredproduct_id or description+unit_price required per itemdraft - Not finalized, can be editedpending - Waiting for paymentpaid - Fully paidpartially_paid - Partially paidoverdue - Past due date, unpaidcancelled - Cancelledunpaid - No payment receivedpartial - Partially paidpaid - Fully paidcancelled - Invoice cancelledtax_amount = amount * (tax_rate / 100). The total_amount = amount + tax_amount.{
"data": {
"id": "inv_abc123",
"invoice_number": "INV-2024-12-0001",
"customer_id": "cus_xyz789",
"customer_email": "customer@example.com",
"customer_name": "John Doe",
"amount": "1000.00",
"tax_rate": 15,
"tax_amount": "150.00",
"total_amount": "1150.00",
"paid_amount": "0.00",
"remaining_amount": "1150.00",
"currency": "GMD",
"status": "pending",
"payment_status": "unpaid",
"payment_url": "https://pay.jokoor.com/invoice/inv_abc123",
"pdf_url": "/v1/pay/invoices/public/inv_abc123/pdf",
"due_date": "2024-12-31T23:59:59Z",
"issued_date": "2024-01-15T10:30:00Z",
"subscription_id": null,
"mode": "test",
"livemode": false,
"version": 1,
"items": [
{
"description": "Web development services",
"quantity": 1,
"unit_price": "1000.00",
"total": "1000.00"
}
],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}payment_url is only available for invoices that can be paid online:pending, partially_paid, overdue invoicesdraft, paid, cancelled invoicesGET /v1/pay/invoices/{id}GET /v1/pay/invoices| Parameter | Type | Required | Description |
|---|---|---|---|
offset | integer | No | Number of items to skip (default: 0) |
limit | integer | No | Maximum number of items to return (default: 20, max: 100) |
status | string | No | Filter by status |
customer_email | string | No | Filter by customer email |
search | string | No | Search in invoice number or customer name |
PUT /v1/pay/invoices/{id}| Field | Type | Required | Description |
|---|---|---|---|
customer_email | string | No | Customer email |
customer_name | string | No | Customer name |
customer_address | string | No | Customer address |
customer_phone | string | No | Customer phone |
tax_rate | number | No | Tax rate as percentage (0-100) |
due_date | string | No | Due date (ISO 8601) |
notes | string | No | Notes or terms |
metadata | object | No | Custom metadata |
POST /v1/pay/invoices/{id}/finalizePOST /v1/pay/invoices/{id}/send| Field | Type | Required | Description |
|---|---|---|---|
message | string | No | Optional custom message to include in the email |
POST /v1/pay/invoices/{id}/cancelGET /v1/pay/invoices/{id}/pdfpayment_url which provides a hosted payment page.payment_urlpaidCustomer receives invoice email
↓
Clicks "Pay Invoice" → visits payment_url
↓
Hosted page shows invoice details
↓
Customer selects payment method (Wave, Afrimoney, etc.)
↓
Completes payment with provider
↓
Returns to success page| Payment Method | Use This Option |
|---|---|
| Wave | Option 1 (Online - payment_url) |
| Afrimoney | Option 1 (Online - payment_url) |
| Card | Option 1 (Online - payment_url) |
| QMoney | Option 1 (Online - payment_url) |
| Cash | Option 2 (Offline - record payment) |
| Bank Transfer | Option 2 (Offline - record payment) |
| Check/Cheque | Option 2 (Offline - record payment) |
| Western Union | Option 2 (Offline - record payment) |
| MoneyGram | Option 2 (Offline - record payment) |
payment_url