Get Purchase Balance
GET
/v1/balance
const url = 'https://api.pekangame.space/api/reseller/v1/balance';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.pekangame.space/api/reseller/v1/balance \ --header 'Authorization: Bearer <token>'The calling reseller’s current Purchase Balance (prepaid credit), in sen.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The current balance.
Media typeapplication/json
object
balance_sen
required
integer
Example
{ "balance_sen": 125000}MISSING_API_KEY or INVALID_API_KEY.
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "MISSING_API_KEY", "message": "An API key is required. Send it as a bearer token."}RESELLER_INACTIVE or IP_NOT_ALLOWED.
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "RESELLER_INACTIVE", "message": "This reseller account is deactivated."}RATE_LIMITED — retry after the Retry-After header.
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "RATE_LIMITED", "message": "Too many requests. Retry after the period given in the Retry-After header."}