2.3. Get balance

For integration purposes use staging environment sandbox.paywize.com instead of production gate.paywize.com. Get balance requests are initiated through HTTPS POST request by using URL in the following format:

The End point ID is an entry point for incoming Merchant’s transactions for single currency integration.

https://gate.paywize.com/paynet/api/v2/get-balance/ENDPOINTID – for Get balance transaction by End point ID

Get balance API also supports receiving all current balances values by merchant and by manager login.

https://gate.paywize.com/paynet/api/v2/get-balance/merchant/MERCHANTLOGIN – for Get balance transaction by Merchant login.

https://gate.paywize.com/paynet/api/v2/get-balance/manager/MANAGERLOGIN – for Get balance transaction by Manager login.

2.3.1. Get balance by Merchant login

Request Parameters

In order to initiate a Get balance by Merchant login Merchant sends an HTTPS POST request with the parameters specified in Get balance Request Parameters Table below

Get balance by Merchant login Request Parameters Mandatory Description
balance-name Optional Your balance name. If this parameter is omitted, the result will give you all available balances.

Response Parameters

Get balance by Merchant login Response Parameters Description
amount Current balance.
name Balance name.
currency Currency used for selected balance.

Response Example

"name":"Global merchant balance","amount":21.400,"currency":"USD"

Debug

Using HMAC-SHA1

To reproduce your API call, input all of the data from your original request, including the authentication tokens. Don’t forget to set the nonce and timestamp to the values you used. An OAuth signed URL should match regardless of the generating library. If the signatures differ, you know there is a bug in your OAuth signature code.

HTTP method
url
parameters
version
consumer key
consumer secret
timestamp
nonce
signature method

normalized parameters
signature base string
signature
authorization header
              
            
              
            
              
            

2.3.2. Get balance by Endpoint ID

Request Parameters

In order to initiate a Get balance by Endpoint ID Merchant sends an HTTPS POST request with the parameters specified in Get balance Request Parameters Table below

Get balance by Endpoint ID Request Parameters Mandatory Description
balance-provider Mandatory Input your balance provider.

Response Parameters

Get balance by Endpoint ID Response Parameters Description
balance-amount Current balance.

Response Example

balance-amount=29.99

Debug

Using HMAC-SHA1

To reproduce your API call, input all of the data from your original request, including the authentication tokens. Don’t forget to set the nonce and timestamp to the values you used. An OAuth signed URL should match regardless of the generating library. If the signatures differ, you know there is a bug in your OAuth signature code.

HTTP method
endpoint
url
parameters
version
consumer key
consumer secret
timestamp
nonce
signature method

normalized parameters
signature base string
signature
authorization header
              
            
              
            
              
            

2.3.3. Get balance by Manager login

Request Parameters

In order to initiate a Get balance by Manager login Merchant sends an HTTPS POST request with the parameters specified in Get balance Request Parameters Table below

Get balance by Manager login Request Parameters Mandatory Description
balance-name Optional Your balance name. If this parameter is omitted, the result will give you all available balances.

Response Parameters

Get balance Response Parameter Description
amount Current balance.
name Balance name.
currency Currency used for selected balance.
merchantLogin Merchant login for the balance.

Response Example

"name":"Global merchant balance","amount":21.400,"currency":"USD","merchantLogin":"obtmerc"

Debug

Using HMAC-SHA1

File example Adjustments parameters and file example

To reproduce your API call, input all of the data from your original request, including the authentication tokens. Don’t forget to set the nonce and timestamp to the values you used. An OAuth signed URL should match regardless of the generating library. If the signatures differ, you know there is a bug in your OAuth signature code.

HTTP method
url
parameters
version
consumer key
consumer secret
timestamp
nonce
signature method

normalized parameters
signature base string
signature
authorization header
              
            
              
            
              
            

2.3.4. Setting up balances

Balances can be configured for managers and merchants via Accounts tab.

../_images/accountstab.png

1. Set up the transaction type and rates (application direction for rates is set manually), which will add or deduct funds from your account. Rates based on transaction amount and statuses may also deduct money from your balance. Optionally, gate and endpoint can be selected - if they are left empty, balance configuration will work for all gates and endpoints of selected manager.

Configuration button

../_images/confbut.png
../_images/adding_config.png

exclamation If at least one operation type is refactored balances will count by refactored configuration and only for refactored operations, if there is no refactor for operation type, than balances will count by main configuration. For balance 38 Sale operation is refactored, that means for this balance main configuration doesn’t affect. Only Sale operation can affect on Balance 38 and will count as set in balance configuration. Example:

../_images/removealert.png
  1. Choose which balances you would like to use - Account balances, Processor balance (balances for acquirer can be set), Card mapping balances and Gate group balances (setting balances for specific list of gates)
../_images/adding_account_balance.png

Default balance must be selected. If balance-name parameter is left empty, get balance will respond with default balance.

  1. Adjustments for balance can be made via Add adjustment button. Adjustment amount and external source of the adjustment are mandatory.
../_images/adding_adjustments.png

Alternatively, adjustments requests via API are available. Please refer to the file example and debugger. Added adjustments as seen in the UI:

../_images/added_adjustments.png

For better user experience adjustments can be sorted by creation date using the button from below:

../_images/sort_adjustments.png

To change balance created date use Change created date button.

../_images/change_date_account_balance.png
../_images/change_date_confirm_account_balance.png

Reconciliation and Export transaction are available per balance.

../_images/recexbut.png

Transaction period pops up after clicking on Export transaction button. Please note that the date is counted as [day_From, day_To), so the last part will not be included in the interval.

../_images/period_field.png

CSV file contains the following fields:

../_images/csvex.png

Example of configured balance. First balance is funded by sale transaction and defunded by payout and dispute transactions and is set up for USD currency, also merchant rates apply. The other balance is set up for AUD and is only funded by sale transactions, without any rates.

../_images/balance_example.png

Balance rules

Transaction type Impact on balance
sale Add
capture Add
dispute Add
chargeback_reversal Add
arbitration Add
payout_cancel Add
chargeback Deduct
prearbitration Deduct
reversal Deduct
payout Deduct
transfer (deposit2card) Deduct
preauth Rate only
cancel Rate only
fraud Rate only
retrieval Rate only
pan_eligibility Rate only
create_card_mapping Rate only
update_card_mapping Rate only
inquire_card_mapping Rate only
delete_card_mapping Rate only
mfo_scoring Rate only
account_verification Rate only
void Rate only

Adjustments parameters and file example

Adjustments must be sent in archived tsv file format.

Balance Adjustment Parameter Description
Credit amount Credit amount.
Debit amount Debit amount.
External ID Adjustment external ID.
External Merchant ID External merchant ID. Set in properties of merchant/manager.
Balance name Balance name. If parameter is not set, default balance is automatically selected.

tsv file example:

10.45               eid1    THIS_IS_EXT_MERCH_ID    Global merchant balance
90.05               eid2    THIS_IS_EXT_MERCH_ID    Global merchant balance

Balance Adjustment Debug

In order to make an adjustment, tsv file must be archived and sent. 7-Zip or similar archiving software is needed in order to use this debugger.

url
Source
Manager login
filename
control key