Signature Payment Gateway
All Requests from Espay Server will include a signature parameter. All merchants should validate this parameter to make sure the request is only coming from espay server.
The transaction signature is generated by assembling parameters with ##, uppercase those string assembled parameters, hash using SHA256 algorithm, and the seeds to construct the transaction signature are as follows:
Send InvoiceTo send invoice signature, sort the parameters in the following order:
- Signature Key(Key)
- rq_uuid
- rq_datetime
- order_id
- Amount
- Ccy
- comm_code
- Mode
Key used to generate the signature, provided by Espay Integration Team
Request uuid sent by web service.
Request date/time parameter, which is available upon request
Merchant order id.
Transaction amount.
Currency.
Comm_code.
the value is: SENDINVOICE
Example
##7bc074f97c3131d2e290a4as##UUID001##2016-07-25
11:05:49##145000065##10000##IDR##SGWTES##SENDINVOICE##
Closed Invoice
For Closed Invoice Signature, the parameters are in the following order:
- Signature Key(Key)
- rq_uuid
- rq_datetime
- order_id
- Comm_code.
- Mode
The key used to generate signature (provided by Espay Team).
The UUID request sent within web service.
The date/time request sent within web service.
Merchant order id.
Comm Code
The value is: CLOSEDINVOICE
Example
##7bc074f97c3131d2e290a4707a54a623##UUID001##2016-07-25
11:05:49##145000065##SGWTES##CLOSEDINVOiCE##
Transaction Inquiry, Payment notification, Check Payment Status & Update Expire
They have the same order
##KEY##rq_datetime##order_id##mode##
Below is the explanation:
- Signature Key(Key)
- rq_datetime
- order_id
- Mode
- INQUIRY if request is Transaction Inquiry
- PAYMENTREPORT if request is Payment notification
- CHECKSTATUS if request is Check Payment Status
- EXPIRETRANSACTION if request is Update Expire Transaction
The key used to generate signature (provided by Espay Team)
Date/time parameter available upon request
Merchant order or transaction id
this parameter differentiates the signature for each request. This mode consists of
Example
##7bc074f97c3131d2e290a4707a54a623##2016-07-25 11:05:49##145000065##INQUIRY##
##7BC074F97C3131D2E290A4707A54A623##2016-07-25 11:05:49##145000065##PAYMENTREPORT##
The followings are the steps for signature generating process:
- Combine parameter with ##
- Uppercase combined strings
- Hash with sha256
example of string signature after be assembled
##7bc074f97c3131d2e290a4707a54a623##2016-07-25 11:05:49##145000065##INQUIRY##
example of string signature after uppercase
##7BC074F97C3131D2E290A4707A54A623##2016-07-25 11:05:49##145000065##INQUIRY##
example of string signature after sha256
67747e2e6b219879563655eb012f77646b9792736f5693f2e44693fec5a67d26