getBalance (V6)

Description

The getBalance request will retrieve a your available balance for specific currency.

URL: https://secure1.sandbox.directpay.online/API/v6/


Usage

Use this method in order to get your balance in a specified currency


Response

The method will response with your balance and the exchange rate in the chosen currency


Variables to send:

Parameter

Data type

Description


 Request

 Text

 getBalance

Mandatory

CompanyToken

Token

Token you got from 3G to operate this API

Mandatory

Currency

Text

From table of options as accepted from 3G.

Mandatory

Request example:


request example
<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <Request>getBalance</Request>
  <CompanyToken>68B90B5E-25F6-4146-8AB1-C7A3A0C41A7F</CompanyToken>
  <Currency>USD</Currency>
</API3G>


Respond:

The server will respond for the getBalance request according to the following results:

Parameter

Data type

Description

CompanyBalance

Money

Amount of your company balance

ExchangeRate

Text

Exchange rate of your company

Respond example:


response example
<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <CompanyBalance>100,000</CompanyBalance>
  <ExchangeRate>1</ExchangeRate>
</API3G>


Codes in the response:

Code

Explanation

801

Request missing company token

802

Company token does not exist

803

No request or error in Request type name

804

Error in XML

902Data mismatch in one of the fields - fieldname
950Wrong Provider Token