Inquiry Transaction

When redirecting to the payment page, Espay system will ask the details of the transaction to the merchant’s system based on the order id provided by the merchant. This transaction detail will be shown to the customers when customers are in the payment page and to notify the bank system regarding the amount to be processed.


Espay system will send the the request and once the merchant receive the request, merchant is expected to respond with semicolon (;) separator as shown on this template

error_code;error_message;order_id;amount;ccy;description;trx_date

Example of success response from merchant side :

0;Success;TX151028132832A001;50000.00;IDR;Payment For Me;28/10/2015 13:28:32

Example of error response from merchant side :

1;Invalid Order Id;;;;;

Flow Message

ESPAY -> Merchant

Method

HTTP Post

API URL

http://www.yourwebsite.com/inquiry.php or 
https://www.yourwebsite.com/inquiry.php


Parameter Request:
Parameter Name Max Length Mandatory Description
rq_uuid 64 Yes ESPAY request identifier. Unique id for each request
rq_datetime 19 Yes Date and time in ESPAY system when request sent
Password 32 No Password used for identification and validation mechanisms by merchant to verify that a request is completely derived from the ESPAY system
Signature 64 Yes Request signature, refer to API Signature
member_id 20 No Customer code if registered on ESPAY system
comm_code 32 Yes Merchant code was registered on ESPAY system
order_id 20 Yes Transaction Number / Invoice Id / unique id that identify the order / billing / invoice

Parameter Response:
Parameter Name Max length Mandatory Description
rq_uuid 64 Yes ESPAY request identifier. Unique id for each request
rs_datetime 19 Yes Response datetone on Merchant system when request sent
error_code 4 No Merchant will give the information about the request based on this field. 0 or 0000 = Success, process in merchant side is success
Others = Failed, process in merchant side fails(validation error, business process does not match, or other issues)
error_message 32 Yes If error_code is not Success, please put the message or description of the error on this field
signature 64 Yes Response signature, ESPAY will validate this signature. Refer to API Signature
order_id 20 No Transaction Number / Invoice Id / unique id that identifies the order / billing / invoice
amount 13.2 No Amount paid by the customer.
Format : 100000.00
ccy 3 No Transaction’s currency code. ex: IDR
description 32 No The description of the transaction
trx_date 19 No Transaction date in Merchant system
Format : YYYY-MM-DD hh:mm:ss
installment_period 3 No Current options :
30D = 30 Days
3M = 3 Months
6M = 6 Months
12M = 12 Months
customer_details No Refer to Customer Details
shipping_address No Refer to Shipping Address

Customer Details
Parameter Name Max length Mandatory Description
firstname 32 Yes
lastname 32 No
phone_number 16 Yes
email 32 Yes

Shipping Address
Parameter Name Max length Mandatory Description
firstname 32 Yes
lastname 32 No
address 64 Yes
city 32 Yes
postal_code 8 Yes
phone_number 16 Yes
country_code 3 Yes ISO 3166-1 alpha-3







































    

Sample Request:

POST /path/for/inquiry HTTP/1.1 Host: merchant.domain Connection: keep-alive Content-Length: 250 Content-Type: application/x-www-form-urlencoded Accept: */* rq_uuid=ebf8e9df-639e-424f-8148-94d2741edd03&rq_datetime=2020-10- 01T22:55:14+07:00&password=ServicePassword&signature=1e6be48271e94f8f08ca0ad52d4ee 4c8b1d2155b471a7d34720bcca09d80e220&member_id=SGWMERCHANT&comm_code=SGWMERCHANT&or der_id=ESPTRX21183111




Sample Response - Positive Response:

{ Content-Type: application/json { "rq_uuid":"ebf8e9df-639e-424f-8148-94d2741edd03", "rs_datetime":"2020-10-01T22:55:14+07:00", "error_code":"0000", "error_message":"Success", "order_id":"ESPTRX21183111", "amount":"150000.00", "ccy":"IDR", "description":"Pembelian Barang", "trx_date":"2020-10-01 22:55:06", "installment_period":"6M", "customer_details": { "firstname":"Paul", "lastname":"Weller", "phone_number":"081234567878", "email":"paul.weller@mod.co.uk", "signature": "" }, "shipping_address":{ "firstname":"Oemang", "lastname":"Tandra", "address":"Jalan Teknologi Indonesia No. 25", "city":"Jakarta", "postal_code":"12960", "phone":"081234567878", "country_code":"IDN" } }

Sample Response - Negative Response:

{ Content-Type: application/json { "rq_uuid":"ebf8e9df-639e-424f-8148-94d2741edd03", "rs_datetime":"2020-10-01T22:55:14+07:00", "error_code":"0014", "error_message":"invalid order id" }