Getting Started

Base URLs, the two API specifications, and how to authenticate your first request.

1Pick a language

2Try It!

LoadingLoading…
Response
Click Try It! to start a request and see the response here!

The Payment Labs API is a JSON REST API. Every request and response body is JSON, and every authenticated request carries a bearer token.

Base URLs

EnvironmentBase URL
Sandboxhttps://api-sandbox.paymentlabs.io
Productionhttps://api.paymentlabs.io

Sandbox and production are separate environments with separate credentials and data. Build and test in sandbox first. See Environments and Authentication.

Two API specifications

SpecificationWho uses itWhat it covers
Payout APIPayors: accounts that send moneyThe login, your account and ledger accounts, payees and onboarding, batches, payments, payment imports, payment requests, wallets, wallet disputes, and webhook registration
Payin APIMerchants: accounts that accept moneyYour merchant account, checkouts, refunds, subscriptions, terminals and settlements

Both specifications use the same base URLs and the same login. Webhook registration lives in the Payout API, and it covers payin events too, such as checkout-status-changed.

Authenticate

Payment Labs has one login for the whole platform. Payors and merchants use the same operation, and the token works for every API your credential's roles allow.

  1. Exchange your client credentials for a token with Create Access Token (POST /login).
  2. Send the token on every other request in the Authorization header.
curl https://api-sandbox.paymentlabs.io/payors/me \
  -H "Authorization: Bearer <token>"

If your credential only has a payin role, call GET /merchants/me (Get Merchant) instead.

A token expires 3 hours after it is issued. Call POST /login again to get a new one. See Environments and Authentication.

Learn the conventions

Popular Endpoints
Last 24 Hours
LoadingLoading…

Did this page help you?