SDKs and tools

Postman and OpenAPI

The V2 Postman collection (17 requests, local and production environments) and the OpenAPI 3.1 specification, common base of every SDK.

Postman collection#

Postman v2.1 collection of API V2 (version 0.1.0, preview), generated from the OpenAPI specification: one folder per topic, Bearer auth at collection level, response examples and light test scripts. Files: postman folder on GitHub.

FileContent
labpay.postman_collection.jsonThe collection: the 17 V2 merchant operations.
local.postman_environment.jsonbaseUrl = http://localhost:8000/api, empty token.
production.postman_environment.jsonbaseUrl = https://api.labyrinthe-rdc.com/api, empty token.
  1. Postman › Import › labpay.postman_collection.json, then import and select an environment.
  2. In the environment, set token (type *secret*) to your test key (test_xxxxxxxxxxxxxxxx), in the *current value* only: never share an exported environment that contains a key.
  3. Run collection: toolkit, account, then deposit (with a fresh reference), read and sync, list, refund, payout and cancellation, notifications.
  • The refund is only accepted once the deposit is completed (409 DEPOSIT_NOT_COMPLETED otherwise); the payout answers 422 INSUFFICIENT_BALANCE with an empty test balance.
  • The key rotation folder performs real rotations: with the test key it only returns 403 LIVE_TOKEN_REQUIRED. Run it on purpose, with the live token.
  • Same rate limit as production: 120 requests per minute per token.

On the command line, with Newman (refuses a live token and skips rotations):

HTTP
git clone https://github.com/Labyrinthe-Team/labyrinthe-pay-packages.git
cd labyrinthe-pay-packages/postman
npm ci
LABPAY_TOKEN=test_xxxxxxxxxxxxxxxx npm run newman   # API locale par défaut ; LABPAY_BASE_URL pour une autre

OpenAPI specification#

openapi/openapi.yaml (OpenAPI 3.1, version 2.0.0) describes the V2 merchant API (https://api.labyrinthe-rdc.com/api/V2): deposits, payouts, refunds, tracking, countries and providers, account and balances, notifications, and the notification sent to your callback_url (webhooks.payment.finalized). It is derived from the payment engine code and is the common base of every SDK; V1 and the administration routes are out of scope.

  • Import it in Postman, Insomnia or any OpenAPI 3.1 tool to explore the API.
  • Generate a client in a language without an official SDK with an OpenAPI 3.1 generator: keep the SDK rules (unique reference, 422 with a payment = failed payment, webhook signature on the raw body).
  • The error code list (ErrorCode) is open: accept an unknown code.

Specification 2.0.0 does not list API_VERSION_DISABLED and FEATURE_DISABLED yet (version or operation switched off, 503): the Errors page is authoritative.

See also: all SDKs and tools, authentication, test mode.