Check Payment Status

This process is used by merchants to check if their customers have made payment transactions. Merchants will send request to ESPAY system, and ESPAY will respond in JSON format as shown below


Flow

Merchant -> Espay

Method

HTTP Post

API URL

Development : https://sandbox-api.espay.id/rest/merchant/status
Production : https://api.espay.id/rest/merchant/status


Parameter Request:
Parameter Name Max Length Mandatory Description
uuid 64 Yes Request identifier. Unique id to identify these messages with other messages
rq_datetime 19 Yes Date and time in Espay application server when messages are sent
comm_code 32 Yes Merchant code listed in the Espay application
order_id 20 Yes Transaction Number / Invoice Id / unique id that identifies the order / billing / invoice.
is_paymentnotif 1 No if it is filled with:
Y = will hit Merchant's payment notif URL
N = will update trx_status to S in Espay Dashboard
Not sent/not filled/filled with "" = standard check payment status
signature 64 Yes Signature required to validate by merchant. See API Signature

Parameter Response:
Parameter Name Max Length Mandatory Description
rq_uuid 4 Yes Request identifier. Unique id to identify these messages with other messages
rs_datetime 32 Yes Local date/time Espay server when messages are replied
error_code 4 Yes Error code of web service, 0000 means success
error_message 32 Yes Error description
comm_code 32 No Merchant community code listed in the Espay application
tx_id 20 No Transaction ID generated by Bank
order_id 32 No Transaction Number / Invoice Id / unique id that identified the order / billing / invoice
ccy_id 3 No Transaction’s currency code. ex: IDR / USD
amount 13 No Amount paid by the customer
tx_status 2 Yes Payment status :
S = Success
F = Failed
SP = Suspect
IP = In Process
EX = Expired
WC = Waiting Correction (Format Value payment notification missmatch)
tx_reason 50 No Payment Reason
tx_date 10 No Payment Date
created 20 No Transaction created date/time
expired 20 No Transaction expired date/time
bank_name 32 No Bank name of payment
product_name 32 No Bank channel name
product_value 32 No Bank channel code
payment_ref 32 No Transaction reference number (used as transaction identity) recorded on the Espay system
merchant_code 32 No Merchant code defined by Espay
  

Sample Request

POST /rest/merchant/status HTTP/1.1 Host: sandbox-api.espay.id Connection: keep-alive Content-Length: 250 Content-Type: application/x-www-form-urlencoded Accept: */* uuid=80784df2-accb-46fc-92f4-8d3103b38408 &rq_datetime=2021-10-23 22:51:45 &comm_code=SGWBUKUKUSC &order_id=2c4516b6-2e11-4376-9403-775fc927e696 &signature=e7bb3339e618b6fb8ce3035edc83456813efb962e9f2c2b286e92387615b6f15
  

Sample Response:

{ { "rq_uuid": "baefa025e0ca44861a9076c8Z83fccxx", "rs_datetime": "2018-02-27 11:57:45", "error_code": "0000", "error_message": "", "comm_code": "SGWYESSI", "tx_id": "SG31516158283435J", "order_id": "5V94TSUH4W", "ccy_id": "IDR", "amount": "75000000", "tx_status": "IP", "tx_reason": "", "tx_date": "2018-01-17", "created": "2018-01-17 09:59:06", "expired": "2018-01-17 11:59:06", "bank_name": "BANK PERMATA", "product_name": "PERMATA ATM", "product_value": "", "payment_ref": "", "merchant_code": "01" }