Skip to main content

API keys & credentials ๐Ÿ›Ž๏ธ

Direct Payment API

Get onboarded with PAYSTRAX Operations to obtain your credentials.

Get onboarded ๐Ÿงถโ€‹

Before making any request, contact PAYSTRAX Operations at [EMAIL โ€” placeholder, not yet confirmed] to get set up. Once your TEST account is ready, you'll receive:

ItemUsed as
API username and passwordObtain access tokens (see Getting an Access Token)
Token endpoint URLPOST to exchange credentials for a Bearer token
Integrator IDX-Integrator-ID request header (case-sensitive)
Configuration IDreceiver.configuration_id in payment requests
Gateway base URL (TEST)Prefix for all API paths โ€” https://sandbox-api.paystrax.com
Gateway base URL (PRODUCTION)Confirmed separately with your PAYSTRAX contact

Required headers ๐Ÿ›Ž๏ธโ€‹

Every request needs these three headers:

HeaderDescription
AuthorizationBearer <token> โ€” a JWT issued for your integration. Test tokens are typically 60-day JWTs.
X-Integrator-IDYour PAYSTRAX integrator identifier.
Content-Typeapplication/json

Getting an access token ๐Ÿงถโ€‹

Use the token endpoint URL from your PAYSTRAX welcome pack, and request a token via the OAuth2 password grant:

POST <token_endpoint_url>
Content-Type: application/x-www-form-urlencoded

client_id=<client_id_from_paystrax>&username=<api_username>&password=<api_password>&grant_type=password

Read access_token from the JSON response, and use it as Authorization: Bearer <access_token> until it expires โ€” then repeat this step. PAYSTRAX issues the client_id, username, password, and token URL directly; you don't configure or run your own identity server.

note

Token lifetime and refresh policy still needs confirming with PAYSTRAX โ€” test tokens may be long-lived, but this isn't finalised.