Record payments against invoices that were received through offline/manual methods (cash, bank transfers, checks, etc.).This endpoint is for recording payments received OUTSIDE the Jokoor platform.Any payment received outside Jokoor
Wave, Afrimoney, Card, QMoney payments
For online payments, customers should visit the invoice payment_url (the hosted page handles payment processing automatically)
How It Works#
When you record an offline payment:1.
Creates an "offline" transaction in the system
2.
Decreases remaining_amount
3.
Automatically generates a receipt for the payment
4.
partially_paid if amount < remaining amount
paid if amount = remaining amount
Record Invoice Payment#
Record a payment received through offline/manual methods.Endpoint: POST /v1/pay/invoices/{id}/payments| Field | Type | Required | Description |
|---|
amount | string | Yes | Payment amount as decimal string (e.g., "500.00") |
payment_method | string | Yes | Payment method used (e.g., cash, bank_transfer, check, western_union, other) |
transaction_id | string | No | External transaction reference ID (e.g., bank transaction number, check number) |
notes | string | No | Payment notes or remarks (e.g., "Received via Chase Bank, Ref: CHK-123456") |
{
"data": {
"id": "inv_abc123",
"invoice_number": "INV-2024-12-0001",
"total_amount": "1150.00",
"paid_amount": "500.00",
"remaining_amount": "650.00",
"status": "partially_paid"
}
}
Partial Payments: You can record multiple partial payments until the invoice is fully paid. The invoice status automatically updates to partially_paid or paid. A receipt is automatically generated for each payment recorded.
Transaction Record: Recording an offline payment automatically creates a transaction with:payment_method: Your specified method (e.g., "cash", "bank_transfer")
Automatic receipt generation
Common Use Cases#
Cash Payment#
Bank Transfer with Reference#
Check Payment#
Partial Payment#
List Invoice Payments#
Get all payments recorded against an invoice.Endpoint: GET /v1/pay/invoices/{id}/payments{
"data": [
{
"id": "invpay_123",
"invoice_id": "inv_abc123",
"amount": "500.00",
"currency": "GMD",
"payment_method": "bank_transfer",
"transaction_id": "TXN123456",
"payment_date": "2024-01-15T14:30:00Z",
"notes": "Payment received via bank transfer",
"created_at": "2024-01-15T14:30:00Z"
}
]
}
Get Invoice Receipts#
Get all payment receipts associated with an invoice.Endpoint: GET /v1/pay/invoices/{id}/receipts