API Documentation
Who should read this article: DPay Payment Platform technical architects, R&D engineers, and system operation and maintenance engineers who use the DPay Payment Platform merchant self-service system. Through this document, merchants can learn aboutDPay Payment Platform access technology, access product business, access process, access specifications and other information, so that merchants can successfully complete the access work.
Payment Gateway
Please log in to the merchant center to view the gateway address and API connection parameters in the API management development document
Order API
Submit:POST
Address: Payment Gateway/Pay_Indexch.html
parameters Name Name Need SignatureDescription
pay_memberid Merchant No Yes Yes System providers merchant No
pay_orderid Order No Yes Yes Order No Uniquen, length 20
pay_applydate Apply time Yes Yes Format: 2016-12-26 18:18:18
pay_bankcode Channel Code Yes Yes Query in merchant Centre
pay_notifyurl Sever Notice Yes Yes Server return post data
pay_callbackurl Page jump notice Yes Yes Page return post data)
pay_amount Order Amount Yes Yes Unit: MYR
pay_md5sign MD5 Signature Yes No Check Signature Algorithm
pay_productname Goods Name Yes No
pay_productnum Goods Quantity No No
pay_productdesc Goods Description No No
pay_producturl Merchant URL No No
Asynchronous Notice(Server Notice)
Submit:POST
When receive server notice, then return "OK"(if not system will notice it repeatly five tiems).
parameters Name Need SignatureDescription
memberid Merchant Id Yes Yes System Merchant ID
orderid Order No Yes Yes Order No Uniquen, length 20
amount Order Amount Yes Yes
transaction_id transaction_id Yes Yes
datetime transaction time Yes Yes
returncode Transaction Status Yes Yes 00 means SUCCESS,others fail
attach Customized fileds No No Merchant Customized fileds
pay_md5sign MD5 Signature Yes No
Order Query
Submit: POST
Address: Payment Gateway/Pay_Trade_query.html
parameters Name Need SignatureDescription
pay_memberid Merchant Id Yes Yes
pay_orderid Merchant Order No Yes Yes
pay_md5sign MD5 Signature Yes Yes
Return parameters
parameters Name Need SignatureDescription
memberid member ID Yes Yes
returncode Request Status Yes Yes 00 means SUCCESS, others fail
data Order information:(Mix:collection) Yes No
pay_md5sign MD5 Signature Yes No
Return data parameters
parameters Name Description
orderid Merchant Order No
transaction_id transaction_id
amount Order Amount Unit:MYR
time_end Transaction Successful time
trade_state Status SUCCESS:Successful,NOTPAY:no paid
Payout API
Submit:POST
Submit URL: Payment Gateway+/Payment_Dfpay_add.html
parameters Name Need SignatureDescription
mchid Merchant ID Yes Yes System Merchant ID
out_trade_no Merchant Order Number Yes Yes Uniquen Value
money Order Amount Yes Yes Unit: MYR
bankname bankname Yes Yes
subbranch bank branch name No Yes
accountname Bank Account Name Yes Yes
accountnumber Bank Account Number Yes Yes
state State No Yes
city City No Yes
extends Customized fileds No Yes
notifyurl When Payment success or failure server notice No Yes
pay_md5sign MD5 Signature Yes No
Note: Customized fields need to be sent in the extends field and the meaning of the fields, please consult the platform when docking, if the extended field is not required, it will not be transmitted. When it is not empty, the format: first convert to JSON, and then perform Base64 encryption
For example: extends fields includes phone and idno,extends[phone]=13800138000,extends[idno]=111111111111111111。Tranform extends into JSON format{"phone":"13800138000","idno":"111111111111111111"},then ecrypt Json string with base 64 code :eyJwaG9uZSI6IjEzODAwMTM4MDAwIiwiaWRubyI6IjExMTExMTExMTExMTExMTExMSJ9, finally, the extends=eyJwaG9uZSI6IjEzODAwMTM4MDAwIiwiaWRubyI6IjExMTExMTExMTExMTExMTExMSJ9。
Return value
parameters Name Need SignatureDescription
status Status Yes Yes success:success Fail:error
msg Status Description Yes Yes
transaction_id transaction id Yes Yes Return when success
out_trade_no Merchant Order Number Yes Yes Return when success
Payout Server Notify
Submit: POST
notifyurl
parameters Name Need SignatureDescription
status status Yes Yes success:Successful,error:failure
message Status Description Yes Yes
member Merchant ID Yes Yes status=success return
out_trade_no Merchant Order No Yes Yes status=success return
amount Amount Yes Yes status=success return
transaction_id Transaction ID Yes Yes status=success return
refcode Transaction status Yes Yes status=success return
refmsg Transaction Description Yes Yes status=success return
datetime Transaction time Yes Yes status=success,refCode=1 Return
pay_md5sign MD5 Signature Yes No
Payout Query API
Submit: POST
Submit URL: Payment Gateway+/Payment_Dfpay_query.html
parameters Name Need SignatureDescription
out_trade_no Merchant Order No Yes Yes
mchid Merchant ID Yes Yes
pay_md5sign Signature Yes No
Return
parameters Name Need SignatureDescription
status status Yes Yes success:Successful,error:failure
msg Statue Description Yes Yes
mchid Merchant ID Yes Yes status=success return
out_trade_no Merchant Order No Yes Yes status=success return
amount Amount Yes Yes status=success return
transaction_id Transaction ID Yes Yes status=success return
refCode business status Yes Yes status=success return
refMsg business Description Yes Yes status=success return
success_time Succecc time Yes Yes status=success,refCode=1 Return
pay_md5sign MD5 Signature Yes No
refCode Return
Return parameters Name
1 success
2 Rejected Payout
3 Processing Payout
4 Pending Payout
5 Reject Approval
6 Waiting for approval
7 Failed Payout
8 Unkown status
Note: only status=success and refCode=1 then mean transaction successfully
Signature Algorithm
The general steps for signature generation are as follows:
The first step is to set all the sent or received data as set M, sort the parameters of non-empty parameter values in set M according to the ASCII code of the parameter name from small to large (lexicographic order), using the URL key-value pair format (ie key1 =value1&key2=value2...) is concatenated into a string.
The second step is to apply the key to the last splicing of stringA to obtain the stringSignTemp character string, and perform MD5 operation on stringSignTemp, and then convert all characters of the obtained character string to uppercase to obtain the sign value signValue.
stringSignTemp="pay_amount=pay_amount&pay_applydate=pay_applydate&pay_bankcode=pay_bankcode&pay_callbackurl=pay_callbackurl&pay_memberid=pay_memberid&pay_notifyurl=pay_notifyurl&pay_orderid=pay_orderid&key=key" sign=MD5(stringSignTemp).toUpperCase()
Merchant balance Query API
Submit:POST
API URL: Payment Gateway+/Payment_Dfpay_balance.html
parameter Name Need SignatureDescription
mchid Merchant ID Yes Yes
pay_md5sign MD5 Signature Yes Yes
Return parameters
parameters Name Need SignatureDescription
status Status Yes Yes success:success,error:fail
msg Status Description Yes Yes
mchid Merchant ID Yes Yes status=success Return
balance Withdrawal balance Yes Yes status=success Return
blockedbalance Block balance Yes status=success Return
pay_md5sign MD5 Signature Yes No
Bank List Query API
Submit:POST
API URL: Payment Gateway+/Payment_Dfpay_bankquery.html
parameter Name Need SignatureDescription
mchid Merchant ID Yes Yes
pay_md5sign MD5 Signature Yes Yes
Return parameters
parameters Name Need SignatureDescription
status Status Yes Yes success:success,error:fail
msg Status Description Yes Yes
mchid Merchant ID Yes Yes
bank Bank list Yes Yes Bank detail parameters will be listed
pay_md5sign MD5 Signature Yes No
bank parameters Name Need SignatureDescription
bank_name bank_name Yes Yes
code bank code Yes Yes
country country Yes Yes
currency currency Yes Yes
bank_id bank id Yes Yes
Validate Bank Account API
Submit:POST
API URL: Payment Gateway+/Payment_Dfpay_validatebankaccount.html
parameter Name Need SignatureDescription
mchid Merchant ID Yes Yes
accountnumber Bank Account Number Yes Yes
accountname Bank Account Name Yes Yes
bankcode Bank Code Yes Yes You can query from bank query api
pay_md5sign MD5 Signature Yes Yes
Return parameters
parameters Name Need SignatureDescription
status Status Yes Yes success:success,error:fail
msg Status Description Yes Yes
mchid Merchant ID Yes Yes
bankcode Bank code Yes Yes
accountnumber Bank account Number Yes Yes
accountname Bank account name Yes Yes
pay_md5sign MD5 Signature Yes No
Channel Code
Please log in to the merchant center and check the payment channel code of the application in the API management channel rate.