paytrack docs
Payments
Record payments, reconcile balances, and inspect payment history.
Overview
Use payment endpoints to record manual payments, external transfers, and Paystack-backed collections against the correct customer or Payment Plan. Payment Plans use the legacy `tracks` resource and `trackId` field in API v1.
Required scope
payments:read or payments:writeEndpoints
Operations
Available API methods for this resource.
GET/api/v1/paymentsList payments.
POST/api/v1/paymentsRecord a payment.
GET/api/v1/payments/{id}Retrieve one payment.
GET/api/v1/tracks/{id}/paymentsList payments for one Payment Plan.
Request example
Example
curl https://paytrack.ng/api/v1/payments \
-X POST \
-H "Authorization: Bearer $PAYTRACK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"trackId": "trk_123",
"amount": 25000,
"method": "bank_transfer",
"reference": "bank-ref-001"
}'Response example
Example
{
"success": true,
"data": {
"id": "pay_123",
"amount": 25000,
"method": "bank_transfer",
"status": "recorded"
},
"request_id": "req_xxx"
}Error example
Example
{
"success": false,
"error": {
"code": "validation_error",
"message": "The request failed validation.",
"details": {}
},
"request_id": "req_xxx"
}