Create Order

Introduction

Create order after user scan the QRcode.

API Description

Request Method:POST

Request Path:open/api/scan/payment

Parameters

Request Parameters

ParameterSignMandatoryTypeLengthDescription
appIdYYstring64AppId is unique for merchant
signNYstring512Sign
merchantOrderNoYYstring64Merchant order number (must be unique)
qrCodeYYstring512QR Code string
amountYYstring20Order amount (unit as fiat currency, 1=1.00)
PHP: retains two digits
VND: no retain decimals
VND payment limit: 0.4USD ~ 200USD
currencyYYstring20Fiat currency (unit of amount)
userIdYYstring64UserId is unique for user (email / phone number)
userIpYYstring32User IP address
feeTypeYYstring32Inner Buckle: INNER_BUCKLE
Outer Buckle: OUTER_BUCKLE
callbackUrlYYstring128The address receiving order webhook
customParamNNstring1024Custom fields
└expireTimeNNintExpire time in second
└returnUrlNNstringThe redirection address after the successful purchase
└cancelUrlNNstringThe redirection address after the order cancel
└subMerchantNNstringSub merchant
└goodsNNobjectGoods information
└─goodsIdNNobjectGoods ID
└─goodsNameNNintGoods name
└─goodsDescNNstringGoods description

Example

{ "appId": "TEST000001", "sign": "TEST000001", "merchantOrderNo": "11187", "amount": "100000", "currency": "VND", "feeType":"INNER_BUCKLE", "qrCode": "00020101021138580010A000000727012800069704070114190360421800120208QRIBFTTA53037045802VN830084006304EDC5", "userId": "505884978@qq.com", "userIp": "14.232.142.199", "callbackUrl": "http://127.0.0.1:8022/open/api/callback", "customParam": { "expireTime": 360000, "subMerchant": "subMerchant", "returnUrl": "https://crypto-payment-dev.alchemytech.cc/crypto/callback/kuCoinIn", "cancelUrl": "https://crypto-payment-dev.alchemytech.cc/crypto/callback/kuCoinIn", "goods": [ { "goodsId": "1", "goodsName": "Gift card", "goodsDesc": "Gift card product" } ] } }

Response Parameters

ParameterTypeDescription
successbooleanSuccess
errorbooleanError
codelongResponse code
msgstringResponse message
traceIdstringTrace id
modelobjectResponse content

Model Response Parameters

ParameterTypeDescription
requestIdstringThe unique Merchant Trade No generated by merchants
payOrderIdstringKuCoin Pay unique order ID
expireTimestringOrder expiration time
qrcodestringQR code image link
appPayUrlstringCheckout page URL hosted by KuCoin Pay

Example

{ "code": "0", "msg": "success", "model":{ "requestId": "0a5f77dd-5679-48d1-8872-2fb9a35cc969", "payOrderId": "kpt_2024120306484849000911110112", "expireTime": 1733210327961, "qrcode": "https://nginx-web-01.sit.kucoin.net/pay/checkout/kpt_2024120306484849000911110112", "appPayUrl": "https://nginx-web-01.sit.kucoin.net/pay/checkout/kpt_2024120306484849000911110112" }, "traceId": "6668024eeb989c77a375967aded5d646", "success": true, "error": false }

Did this page help you?