API V2 (recommended)

Status and synchronisation

V2 payment statuses, the filtered payment list, a payment's details and an immediate status refresh.

Statuses#

statusMeaning
pendingInitiated, awaiting the final status (customer confirmation, provider processing, queue).
completedCompleted. Deposit: your balance is credited. Payout / refund: the money has left.
failedFailed or cancelled; failure gives the code and message. Payout / refund: your balance is credited back.
  • completed and failed are final: a payment no longer changes afterwards.
  • gateway_status gives the raw LabPay status, for information. Rely on status.
  • A network or server error on the LabPay side at initiation is never a failure: the payment stays pending and its status is re-read automatically. It is only declared failed if 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).

FieldTypeRequiredDescription
statusstringNopending | completed | failed
operationstringNodeposit | payout | refund
currencystringNo3-letter code (e.g. CDF).
countrystringNo3-letter country code (e.g. COD).
referencestringNoYour exact reference.
from, todateNoCreation bounds, YYYY-MM-DD format (to ≥ from).
per_pageintegerNo1 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.