...
In order to use it add the refresh token (provided in the original /oauth/token call) and change the grant_type to refresh_token.
Scope Parameter Usage
For the token endpoint there are two possible scopes: merchant or customer.
A token with a merchant scope will be allowed for all endpoints
A token with a customer scope will be allowed in all endpoints required by customer facing UI, other endpoints will considered this token invalid.
The endpoints that should be called using a customer scope should be:
POST /client-id/{client_id}/merchants/login
POST /client-id/{client_id}widget/init
POST /client-id/{client_id}/apply
GET /client-id/{client_id}/terms-and-conditions
POST /client-id/{client_id}/information
POST /client-id/{client_id}/accounts/:account_number/calculate-interest
POST /client-id/{client_id}/authorization
Request Parameters:
Type | Parameter | RequiredDetails | Details |
---|---|---|---|
FORMDATA | client_id | Yes |
|
FORMDATA | client_idsecret | Yes |
|
FORMDATA | client_secret | Yes |
|
BODY | grant_type |
| |
BODY | grant_type |
| |
BODY | refresh_token |
| |
BODY | scope |
|
Example Request:
Code Block | ||
---|---|---|
| ||
{
"client_id": "flexitidemo",
"client_secret": "77fde15a-9d33-4e15-930a-76e4b3ae33e9",
"grant_type": "client_credentials",
"scope": "merchant"
} |
Response Parameters:
Type | Parameter | Required | Details |
---|---|---|---|
BODY | access_token | Yes |
|
BODY | expires_in | Yes |
|
BODY | refresh_token | Yes |
|
...