Authentication
Access the SP Pay RESTful API.
All resources in this API are protected. You will need a token to access any resource.
API Tokens can only be generated by users in your domain, who have the permissions to do so.
Before attempting to generate a token, please make sure your user has access to do so, otherwise Grant API Access to the user.
Granting API Access
To be able to grant API Access, you need to have the required permission to do so.
- Access the manage API Access page from API Access Management
- ...
Generating API Token
To generate an API Token, you will need your username and password, along with your client ID and Secret that is generated and sent for you, when you activate API access for your user.
All subsequent calls, must be made with this token passed as a Bearer Authorization Key
POST - Generate API Token
Request to generate an API Token for subsequent requests as a Bearer Token.
Endpoint
{{sppay-host}}/v1/api/token
Request
{
"grant_type" : "password",
"client_id": "9aeb3c7d-a851-41af-b392-629c548c7596",
"client_secret": "YqNyGOHq5PpEwbLVpbi1BYs5TXjZgVGKrqkdi4Bz",
"username": "[email protected]",
"password": "Yourp@ssw0rd"
}
Grant type your application requires. Set value to password
.
A unique ID given to every API accessing user. This is generated when creating API Access for a user.
A unique password given to every API accessing user. This is generated when creating API access for a user.
Your email you use to login to the SP Pay portal.
Your password you use to login to the SP Pay portal.
Response
{
"token_type": "Bearer",
"expires_in": 31622400,
"access_token": "eyJ0eXAiOiJKV1QiLCJ...",
"refresh_token": "def50200e7465a07dbd7fdd05..."
}
Token type returned.
Token expiration time in seconds. After a token expires, it will not be usable.
Your access token. This should be passed as a Bearer token is subsequent requests.
Refresh token, optionally used to extend expiration time of access token.