API V2 (recommended)
Status and synchronisation
V2 payment statuses, the filtered payment list, a payment's details and an immediate status refresh.
Statuses#
status | Meaning |
|---|---|
pending | Initiated, awaiting the final status (customer confirmation, provider processing, queue). |
completed | Completed. Deposit: your balance is credited. Payout / refund: the money has left. |
failed | Failed or cancelled; failure gives the code and message. Payout / refund: your balance is credited back. |
completedandfailedare final: a payment no longer changes afterwards.gateway_statusgives the raw LabPay status, for information. Rely onstatus.- A network or server error on the LabPay side at initiation is never a failure: the payment stays
pendingand its status is re-read automatically. It is only declaredfailedif LabPay still does not know it after 15 minutes.
To learn the final status, prefer the notification on your callback_url. Reading (GET or sync) is a safety net, without a tight loop.
List payments#
GET /V2/payments#
V2 payments of the token, newest first, in the mode of the key used (live or test).
| Field | Type | Required | Description |
|---|---|---|---|
status | string | No | pending | completed | failed |
operation | string | No | deposit | payout | refund |
currency | string | No | 3-letter code (e.g. CDF). |
country | string | No | 3-letter country code (e.g. COD). |
reference | string | No | Your exact reference. |
from, to | date | No | Creation bounds, YYYY-MM-DD format (to ≥ from). |
per_page | integer | No | 1 to 100, 20 by default. |
Completed deposits
curl "https://api.labyrinthe-rdc.com/api/V2/payments?status=completed&operation=deposit&per_page=50" \
-H "Authorization: Bearer test_xxxxxxxxxxxxxxxx" \
-H "Accept: application/json"The response is paginated: data (list of payments), links (first, last, prev, next) and meta (current_page, last_page, per_page, total…). Next page: page parameter.
The SDKs walk through the pages for you (iterate, IterateAsync, stream in Java) and find a payment by your reference (findByReference, find_by_reference), which returns null / None when it is unknown.
Get a payment#
GET /V2/payments/{id}#
{id} is the LabPay identifier (DEP-…, PAY-…, RFD-…). Unknown for this token or mode: 404 PAYMENT_NOT_FOUND. To find a payment by your reference, use GET /V2/payments?reference=….
Read a payment
curl "https://api.labyrinthe-rdc.com/api/V2/payments/DEP-01JCX8Q3T6Y0V5W1Z2A3B4C5D6" \
-H "Authorization: Bearer test_xxxxxxxxxxxxxxxx" \
-H "Accept: application/json"Refresh the status now#
POST /V2/payments/{id}/sync#
Queries LabPay immediately for a payment still pending, applies its status, then returns the updated payment. On an already final payment, simply returns the payment.
Force a refresh
curl -X POST "https://api.labyrinthe-rdc.com/api/V2/payments/DEP-01JCX8Q3T6Y0V5W1Z2A3B4C5D6/sync" \
-H "Authorization: Bearer test_xxxxxxxxxxxxxxxx" \
-H "Accept: application/json"With the test key, sync may answer 503 TEST_MODE_DISABLED when test mode is suspended; GET /V2/payments/{id} stays available.