Create a new Authentication

All requests to the Pay Advantage API need to be authenticated.
The Authentication API's are used to authenticate to Pay Advantage using your credentials or via Oauth2
Your API credentials can be found in the integration section of your Pay Advantage portal

To authenticate and authorise your API requests an initial call is made to the /token endpoint with credentials passed as JSON in the request body.

Your username and password credentials should be passed as JSON in the request body. A successful response will return an access_token that must be included in any subsequent requests as an authorisation header of type bearer.
The bearer token obtained from this call has the time until expiry in the response message, after this time any request to the Pay Advantage API using an expired token will return a STATUS 401 unauthorised response. After which a new bearer token will need to be requested.
Please ensure these requests are made from a server and not from a browser. Exposing these tokens on a browser can result in security compromises.
This endpoint supports two types of requests: one for credential-based authentication using a username and password, and the other for OAuth2 PKCE authentication.
When utilizing credential-based authentication, please note that a refresh token will not be provided. Consequently, you will need to re-authenticate each time the access token expires.
With OAuth2 authentication, you have the advantage of using refresh tokens to refresh your access token. By utilizing the refresh token, you can easily obtain a new access token without having to go through the entire authentication process again.

To re-authenticate with a refresh token, simply call this endpoint again with a valid refresh token.
To utilize our OAuth2 service, kindly get in touch with our support team. The support team guide you through the process of registering your application into the PayAdvantage system and granting the necessary authorization for OAuth2. For more information view the example of OAuth2 PKCE authentication on the

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