GET TOKEN

Field Type Type Required Example Description
User User(64) String Yes TEST
Password Password Password Yes TEST123

EXAMPLE :

RESPONSE:

{
"status": "SUCCESS" ,
"msg": "eyJ0eXAiOiJKV1QiLCJhbGciO.eyJpc3Mi…"
}

CREATE QR CODE

URL : https://apimerchants.kesspay.com/make_mch_api

TYPE: POST

Bearer Token :Use token from above.

Field Type Type Required Example Description
ID Merchant store_id String Yes 2 The store ID is used to identify a store under a merchant.
Amount amount Number Yes 100 Price of goods in the order. You can setup your currency in the backoffice.
ID Merchant store_id String Yes 2 The store ID is used to identify a store under a merchant.
DService ID service_id Integer Yes 2 2 =alipay

EXAMPLE :

RESPONSE:

{
"qr_code": "https://qr.alipay.com/bax64ey..." ,
"amount": 10 ,
"doc_id": "60332" ,
"out_trade_no": "202002201349-603312" ,
"result_code": "SUCCESS"
}

CHECK CUSTOMER PAID OR NOT

Field Type Type Required Example Description
out_trade_no out_trade_no String Yes 201910181307569 820279217-45678 You can get out_trade _no from response when you created QR Code.

EXAMPLE :

RESPONSE:

{
"is_success": true ,
"message": "Payment Successful !"
}

GET API TOKENBEFORE EVERY REQUEST

Field Type Type Required Example Description
out_trade_no out_trade_no String Yes 201910181307569 820279217-45678 You can get out_trade _no from response when you created QR Code.

EXAMPLE :

RESPONSE:

{
"is_success": true ,
"message": "Payment Successful !"
}

NATIVE PAY

  • Use this API to request a dynamic qr code with a specific transaction amount. Buyer will scan this qr code to proceed the payment.
  • sub_store_name is nullable. Merchant sub store name use to show payer as the payment body. Default is merchant store name.
  • sub_store_id is nullable. Merchant sub store id not use for payment. It just reference.

Content-Type: application/json

Authorization: Bearer eyJ0eXA iOiJKV1QiLCJhbGciOiJIUzI1NiJ9. eyJpc3MiOiJ3d3cua2Vzc3BheS5jb2 0iLCJhdWQiOiJ3d3cua2Vzc3BheS 5jb20iLCJpYXQiOjE1OTU1NTgyMTA sIm5iZiI6MTU5NTU1ODIxMSwiZXhwI joxNTk1NTYxMjExLCJkYXRhIjp7InV zZXIiOiJURVNUMiIsInB3ZCI6Ijk2Y mViODM0Mzk1N2JjZTJjY2QxMjZmZDJ jZWNlZjM5M2FjZGM2NDMxNjJjY2IzM zM1NTdkNDUyYjgyODg0NjIifX0. jIY-TU6pte0K21yPeLGttDBRdZ7D-_jn VUAmv6fE5io

REQUEST:

{
"service_id": 2 ,
"store_id": "109038" ,
"sub_store_id": 1232422 ,
"sub_store_name": "Foo Bar" ,
"amount": 0.01 ,
"auth_code": 284957847201390662 ,
"out_trade_no": "ORDER-433935453408R644"
}

RESPONSE:

{
"success": true ,
"data": {
"qr_code": "weixin:\/\/wxpay\/bizpayurl?pr=6E4ptwz"
"amount": 0.01,
"out_trade_no": "ORDER-433935453408RR",
"result_code": "SUCCESS",
}
}

QUICK PAY

  • Use this API to request a payment from buyer with a specific transaction amount. Seller scan the buyer qr code to proceed the payment.
  • *Note: Request timeout should be increase to 45s, if payer required to enter the payment pin code to confirm the payment. The MOTP server will called continuously until the payment is successful or timeout (advised timeout time is 45s, advised calling frequency is 3s once) sub_store_id is nullable. Merchant sub store id not use for payment. It just reference.
  • sub_store_name is nullable. Merchant sub store name use to show payer as the payment body. Default is merchant store name.

Content-Type: application/json

Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9. eyJpc3MiOiJ3d3cua2Vzc3BheS 5jb20iLCJhdWQiOiJ3d3cua2Vzc3BheS5jb20iL CJpYXQiOjE1OTU1NTgyMTAsIm5 iZiI6MTU5NTU1ODIxMSwiZXhwIjoxNTk1NTYxMj ExLCJkYXRhIjp7InVzZXIiOiJUR VNUMiIsInB3ZCI6Ijk2YmViODM0Mz k1N2JjZTJjY2QxMjZmZDJjZWNlZjM 5M2FjZGM2NDMxNjJjY2IzMzM1NT dkNDUyYjgyODg0NjI ifX0.jIY-TU6pte0K21yPeLGttDB RdZ7D-_jnVUAmv6fE5io

REQUEST:

{
"service_id": 2 ,
"store_id": "109038" ,
"sub_store_id": 1232422 ,
"sub_store_name": "Foo Bar" ,
"amount": 0.01 ,
"auth_code": 284957847201390662 ,
"out_trade_no": "ORDER-433935453408R644"
}

RESPONSE:

{
"success": true ,
"data": {
"amount": 0.01 ,
"currency": "USD",
"out_trade_no": "ORDER-433935453408R6",
"transaction_id": "4200000595202007228867391034",
"result_code": "SUCCESS"
}
}

REFUND TO BUYER

Content-Type: application/json

Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9. eyJpc3MiOiJ3d3cua2Vzc3BheS 5jb20iLCJhdWQiOiJ3d3cua2Vzc3BheS5jb20iL CJpYXQiOjE1OTU1NTgyMTAsIm5 iZiI6MTU5NTU1ODIxMSwiZXhwIjoxNTk1NTYxMj ExLCJkYXRhIjp7InVzZXIiOiJUR VNUMiIsInB3ZCI6Ijk2YmViODM0Mz k1N2JjZTJjY2QxMjZmZDJjZWNlZjM 5M2FjZGM2NDMxNjJjY2IzMzM1NT dkNDUyYjgyODg0NjI ifX0.jIY-TU6pte0K21yPeLGttDB RdZ7D-_jnVUAmv6fE5io

REQUEST:

{
"service_id": 30 ,
"store_id": "109038" ,
"refund_amount": 0.01 ,
"out_trade_no": "ORDER-433935453408R6" ,
"out_refund_no": "REFUND-433935453408R6-1" ,
"reason": "...."
}

RESPONSE:

{
"success": true ,
"data": {
"service_id": 30 ,
"store_id": 109038,
"refund_amount": 0.01,
"currency": "USD",
"out_trade_no": "ORDER-433935453408R6",
"out_refund_no": "REFUND-433935453408R6-1",
"transaction_id": "420000059520200722886",
"result_code": "SUCCESS"
}
}

CHECK PAYMENT STATUS

Content-Type: application/json

Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9. eyJpc3MiOiJ3d3cua2Vzc3BheS 5jb20iLCJhdWQiOiJ3d3cua2Vzc3BheS5jb20iL CJpYXQiOjE1OTU1NTgyMTAsIm5 iZiI6MTU5NTU1ODIxMSwiZXhwIjoxNTk1NTYxMj ExLCJkYXRhIjp7InVzZXIiOiJUR VNUMiIsInB3ZCI6Ijk2YmViODM0Mz k1N2JjZTJjY2QxMjZmZDJjZWNlZjM 5M2FjZGM2NDMxNjJjY2IzMzM1NT dkNDUyYjgyODg0NjI ifX0.jIY-TU6pte0K21yPeLGttDB RdZ7D-_jnVUAmv6fE5io

REQUEST:

{
"store_id": 109038 ,
"out_trade_no": "ORDER-433935453408R6"
}

RESPONSE:

{
"success": true ,
"data": {
"is_success": true ,
"service_id": 30,
"out_trade_no": "ORDER-433935453408R6",
"amount": 0.01,
"out_trade_no": "ORDER-433935453408R6",
"out_refund_no": "REFUND-433935453408R6-1",
"currency": "USD",
"message": "Payment Successful!"
}
}

CHECK REFUND STATUS

Content-Type: application/json

Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9. eyJpc3MiOiJ3d3cua2Vzc3BheS 5jb20iLCJhdWQiOiJ3d3cua2Vzc3BheS5jb20iL CJpYXQiOjE1OTU1NTgyMTAsIm5 iZiI6MTU5NTU1ODIxMSwiZXhwIjoxNTk1NTYxMj ExLCJkYXRhIjp7InVzZXIiOiJUR VNUMiIsInB3ZCI6Ijk2YmViODM0Mz k1N2JjZTJjY2QxMjZmZDJjZWNlZjM 5M2FjZGM2NDMxNjJjY2IzMzM1NT dkNDUyYjgyODg0NjI ifX0.jIY-TU6pte0K21yPeLGttDB RdZ7D-_jnVUAmv6fE5io

REQUEST:

{
"store_id": 109038 ,
"out_trade_no": "ORDER-433935453408R6"
}

RESPONSE:

{
"success": true ,
"data": {
"is_success": true ,
"service_id": 30,
"out_trade_no": "ORDER-433935453408R6",
"amount": 0.01,
"out_trade_no": "ORDER-433935453408R6",
"out_refund_no": "REFUND-433935453408R6-1",
"currency": "USD",
"message": "Refund Successful!"
}
}