API keys & credentials ๐๏ธ
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:
| Item | Used as |
|---|---|
| API username and password | Obtain access tokens (see Getting an Access Token) |
| Token endpoint URL | POST to exchange credentials for a Bearer token |
| Integrator ID | X-Integrator-ID request header (case-sensitive) |
| Configuration ID | receiver.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:
| Header | Description |
|---|---|
Authorization | Bearer <token> โ a JWT issued for your integration. Test tokens are typically 60-day JWTs. |
X-Integrator-ID | Your PAYSTRAX integrator identifier. |
Content-Type | application/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.
Token lifetime and refresh policy still needs confirming with PAYSTRAX โ test tokens may be long-lived, but this isn't finalised.