DengiOnline

2017-07-29 03:29:17

TRANSACTIONS action

This action returns transactions list for a period of time.

NOTE!
We guarantee to keep all the payment records for the term of two months. Older records are subject to archiving and backing up and thus become unavailable via API requests.

Request Parameters

Apart from the basic parameters, request for the list of transactions contains the following tags in “params” node:

Parameter

Description

Format

Mandatory

from

Startdate (time is optional) of selection

YYYY-MM-DDHH:MM:SS

yes

to

End date (time is optional) of selection

YYYY-MM-DDHH:MM:SS

yes

limit

Maximum entries number per request

Upper limit is 100 to decrease the System load. If the limit parameter is not specified, the list will contain 100 entries by default.

integer

no

 

offset

Offset from the selection beginning

For example, limit 10 + offset 20 means "skip the first 20 entries and list the next 10".

integer no

Response Parameters

The GSG System response in XML format apart from the basic parameters contains the following nodes:

Parameter

Description

Format

from, to

Formatted start and end dates from request

YYYY-MM-DD HH:MM:SS

total

Total number of entries within the range

NOTE! The number of returned transactions can be less than the total number of transactions for the specified time period.
For example, there are 200 entries within the time range but the limit is set to 100, so the list will contain 100 entries though the total number is equal to 200. 

integer

limit, offset

Values of the corresponding parameters from the request

integer

The TRANSACTIONS tag (which wraps PAY_STATUS data for one invoice) contains the following tags:

status Transaction status (see PAY_STATUS action) string (255)
income Payment amount in the currency indicated in the request decimal(11.4)  delimiter — decimal point
amount Payment amount in the main account currency decimal(11.4)  delimiter — decimal point
outcome Payment amount in the payment provider currency decimal(11.4)  delimiter — decimal point
fee Fee (%) for the provider in question decimal(11.4)  delimiter — decimal point
rate Conversion rate decimal(11.4)  delimiter — decimal point
ts_create Date and time of the invoice creation YYYY-ММ-DD HH:ММ:SS format
ts_close Date and time of the payment YYYY-ММ-DD HH:ММ:SS format
invoice Invoice ID integer
income_currency Payment currency

string / integer
ISO 4217 number-3

amount_currency The main account currency

string / integer
ISO 4217 number-3

outcome_currency Payment Service Provider currency

string / integer
ISO 4217 number-3

fee_currency Currency of the fee for the provider

string / integer
ISO 4217 number-3

payment_type

Type of the payment.

Possible options: 

  • payment - payment initiated by the project; 
  • balance - change of the balance
payment / balance

Example request

<request>
    <project>1290</project>
    <timestamp>1408510823</timestamp>
    <action>transactions</action>
    <params>
        <from>2014-09-01</from>
        <to>2014-08-01</to>
        <limit>1</limit>
        <offset>10</offset>
    </params>
    <sign>b54e7db4d60be58c9a72626b9dfd78d5</sign>
</request>

Example response (success)

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <status>1</status>
    <reference>263177850</reference>
    <timestamp>1408510826</timestamp>
    <result>
        <from>2014-08-01 00:00:00</from>
        <to>2014-09-01 00:00:00</to>
        <total>95</total>
        <limit>1</limit>
        <offset>10</offset>
        <transactions>
            <transaction>
                <status>processing</status>
                <income>12.7700</income>
                <amount>12.77</amount>
                <outcome>12.77</outcome>
                <fee>0.0000</fee>
                <rate>1.0000</rate>
                <ts_create>2014-08-01 16:17:35</ts_create>
                <ts_close>2014-08-01 16:17:35</ts_close>
                <invoice>43244448</invoice>
                <income_currency>643</income_currency>
                <amount_currency>643</amount_currency>
                <outcome_currency>643</outcome_currency>
                <fee_currency>643</fee_currency>
                <payment_type>payment</payment_type>
            </transaction>
        </transactions>
    </result>
</response>

Example response (fail)

 <?xml version="1.0" encoding="UTF-8"?>
<response>
    <status>32</status>
    <reference>263177850</reference>
    <timestamp>1358268196</timestamp>
</response>