Authentication
Get token
/api/v3/oauth/token POST
Request parameters
URL parameters
{
"grant_type":"client_credentials",
"app_id": "a0c07e56c281c23c9b0bfd949xxxxx",
"app_secret": "e8b22b824d460565f853c8xxxxxx"
}
curl --location 'https://api.starpago.com/api/v3/oauth/token' \
--header 'Content-Type: application/json' \
--data '{
"grant_type":"client_credentials",
"app_id": "a0c07e56c281c23c9b0bfd949xxxxx",
"app_secret": "e8b22b824d460565f853c8xxxxxx"
}'
Returning Responses
{
"code": 0,
"msg": "success",
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtaWQiOjEwMCwidHlwZSI6Im1lcmNoYW50IiwiaXNzIjoic3RhcnBhZ28iLCJleHAiOjE3MjU0NTY0NzN9.TTWj2Ctem2qfPhLtvpx4XG5lrXUH4veQD7dsQb0B9SI",
"token_type": "Bearer",
"expires_in": 1800
}
}
Authentication
After obtaining the token, you need to add it to the request header for subsequent API calls. For example:
curl --location 'https://api.starpago.com/api/v3/merchant/balance' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtaWQiOjEwMCwidHlwZSI6Im1lcmNoYW50IiwiaXNzIjoic3RhcnBhZ28iLCJleHAiOjE3MjU0NTY0NzN9.TTWj2Ctem2qfPhLtvpx4XG5lrXUH4veQD7dsQb0B9SI'
