Introduction
Overview
This defines application endpoint specifications for integration with the virtual account service. It also defines data exchange between the virtual account service and other dependent services.
For all endpoints (except explicitly stated otherwise), the sample response provided for each endpoint represents what is always returned. Therefore, the MANDATORY column in the response parameters table refers to data only (except explicitly stated otherwise), and not the presence or absence of the parameter
BASE URLS
auth_base_url: https://demo.etranzact.com/auth-server/oauth
coreendpoint_base_url: https://demo.etranzact.com/virtual-funding
HTTP RESPONSE CODES
All endpoints maintain a standard set of http response codes within the response body (in status parameter), major response codes are defined below.
SECURITY REQUIREMENTS
The virtual account service will utilizes OAuth2.0 and all Application endpoints are authenticated by default and therefore require that a service maintain a valid token for access to the resource server.
A raw json encoded text is sent in the body of a POST request to https:// {auth_base_url}/token
to generate token while for token refresh, the url https:// {auth_base_url}/token/refresh
is used.
AUTHORIZATION
- Sample Request
- Sample Response
curl --location 'http://{auth_base_url}/token' --header 'Authorization: Basic T05ET0lSU19DTElFTlQ6c2VjcmV0' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'username=ondoirsuser' --data-urlencode 'password=secret' --data-urlencode 'grant_type=password'
{
"status": 200,
"message": "successfully authenticated",
"data": {
"access_token": "hashed access token",
"expires_in": 1500,
"refresh_expires_in": 1800,
"token_type": "bearer",
"id_token": null,
"not-before-policy": 0,
"refresh_token": "hashed refresh token "
},
"execTime": 1.4888868,
"error": ""
}
REAUTHORIZATION
- Sample Request
- Sample Response
refresh_token
: Refresh token received during the initial token generation or last refresh.
curl `${auth_base_url}/auth/refresh`
-H "Content-type: application/json"
-d '{
"refreshToken": "refresh_token"
}
-X POST
{
"status": 200,
"message": "successfully authenticated",
"data": {
"access_token": "hashed access token",
"expires_in": 1500,
"refresh_expires_in": 1800,
"token_type": "bearer",
"id_token": null,
"not-before-policy": 0,
"refresh_token": "hashed refresh token "
},
"execTime": 1.4888868,
"error": ""
}