Payments
Record customer payments against invoices. Payments are posted to the GL immediately and cannot be deleted (audit compliance).
List Payments
GET/api/v1/payments
| Parameter | Type | Description |
|---|---|---|
customerId | string | Filter by customer |
invoiceId | string | Filter by invoice |
startDate | date | Payments on or after this date |
endDate | date | Payments on or before this date |
page | number | Page number |
Record Payment
POST/api/v1/payments
Record a payment. Links to an invoice and updates its paid amount automatically.
| Parameter | Type | Description |
|---|---|---|
customerIdrequired | string | Customer ID |
amountrequired | number | Payment amount |
paymentMethodrequired | string | cash, card, bank_transfer, mobile_money, cheque |
paymentDaterequired | date | Date payment was received |
invoiceId | string | Invoice to apply payment to |
reference | string | External reference (cheque number, transaction ID) |
notes | string | Internal notes |
Request
curl -X POST https://api.syncbooksapp.com/api/v1/payments \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"customerId": "65f1a2b3c4d5e6f7a8b9c0d1",
"amount": 2375,
"paymentMethod": "mobile_money",
"paymentDate": "2026-06-06",
"invoiceId": "65f1a2b3c4d5e6f7a8b9c0d2",
"reference": "MoMo-TXN-123456"
}'Response (201)
{
"data": {
"_id": "65f1a2b3c4d5e6f7a8b9c0d3",
"paymentNumber": "PAY-06-0001",
"amount": 2375,
"paymentMethod": "mobile_money",
"invoiceId": "65f1a2b3c4d5e6f7a8b9c0d2",
"status": "completed"
}
}Note: Payments cannot be deleted (audit compliance). If a payment was recorded in error, create a refund or adjustment instead.