paytrack docs
Payment Plans
Document agreements, instalments, contribution collections, and outstanding balances.
Overview
Payment Plans are represented by the legacy `tracks` resource in API v1 for backward compatibility. Use them for hire purchase agreements, instalment plans, contribution groups, and recurring collections.
Required scope
tracks:read or tracks:writeEndpoints
Operations
Available API methods for this resource.
GET/api/v1/tracksList Payment Plans.
POST/api/v1/tracksCreate a Payment Plan.
GET/api/v1/tracks/{id}Retrieve one Payment Plan.
PATCH/api/v1/tracks/{id}Update a Payment Plan.
GET/api/v1/tracks/{id}/paymentsList payments attached to a Payment Plan.
GET/api/v1/tracks/{id}/ledgerList ledger events for a Payment Plan.
Request example
Example
curl https://paytrack.ng/api/v1/tracks \
-X POST \
-H "Authorization: Bearer $PAYTRACK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customerId": "cus_123",
"title": "Samsung TV installment",
"amount": 420000,
"currency": "NGN",
"installments": 12
}'Response example
Example
{
"success": true,
"data": {
"id": "trk_123",
"title": "Samsung TV installment",
"amount": 420000,
"balance": 420000,
"status": "active"
},
"request_id": "req_xxx"
}Error example
Example
{
"success": false,
"error": {
"code": "validation_error",
"message": "The request failed validation.",
"details": {}
},
"request_id": "req_xxx"
}