DengiOnline

2018-04-26 03:00:20

PAY_STATUS action

Payment status check 

This action returns payment status by invoice ID or transaction ID.

PAY_STATUS action is intended to track transaction status. There is no reason for the PAY_STATUS request to be sent before the PAY action request.

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 payment status check should contain the following tags in “params” node:

Parameter

Description

Format

Mandatory

invoice

Invoice ID from check action response

integer

no

txn_id

Transaction ID in project’s system

string (255)

yes

Response Parameters

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

Parameter

Description

Format

pay_status

Transaction status:

  • new — new transaction, not processed yet;
  • processing — transaction is being processed by DOL;
  • pending — transaction is being processed by payment provider;
  • paid — payment successful;
  • error — payment error;
  • canceled — payment canceled, money returned to the Merchant's balance;
  • expired — operation waiting timeout is exceeded.

Payment status can be defined only by pay_status parameter!

string (255)

income

Payment amount in request’s currency

decimal(11.4)  delimiter — dot

rate

Conversion rate

decimal(11.4)  delimiter — dot

amount

Payment amount in main account’s currency

decimal(11.4)  delimiter — dot

outcome

Payment amount in payment provider’s currency

decimal(11.4)  delimiter — dot

fee

Fee (%) for the provider in question

decimal(11.4)  delimiter — dot

ts_create

Date and time of invoice creation

Date YYYY-ММ-DD HH:ММ:SS

ts_close

Date and time of payment

Date YYYY-ММ-DD HH:ММ:SS

In case of discrepancy of the response format or set of parameters or lack of the body response, repeat the payment status request.

In case of an internal error (1000 - INTERNAL_ERROR) the response may not contain nodes reference and timestamp.

Example request

<?xml version="1.0" encoding="UTF-8"?>
<request>
    <action>pay_status</action>
    <project>1234</project>
    <timestamp>1358268163</timestamp>
    <params>
        <invoice>30080</invoice>
    </params>
<sign>2c4a5a47b6ff89320a61330eac853f81</sign>
</request>

Example response (success)

 <?xml version="1.0" encoding="UTF-8"?>
<response>
    <status>1</status>
    <reference>25107</reference>
    <timestamp>1358268162</timestamp>
    <pay_status>paid</pay_status>
    <income>10.0000</income>
    <amount>10.00</amount>
    <outcome>10.00</outcome>
    <fee>0.0000</fee>
    <rate>1.0000</rate>
    <ts_create>2013-01-15 20:41:48</ts_create>
    <ts_close>2013-01-15 20:42:06</ts_close>
</response>

Example response (fail)

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