Create QR Code

Referred to as create-trans-qrcode

This API is used in Merchant-Presented use cases. To learn more please see the guide.

CreateTransQrcode

POST https://mapi.yuansfer.com/app-instore/v3/create-trans-qrcode

This API creates a transaction and get a QR code for customers to scan to pay in the Transaction QR Code Payment process. Customers scan this QR code using the wallet app to checkout.

Request Body

NameTypeDescription

merchantNo*

string

Merchant ID

storeNo*

string

Store ID

storeAdminNo

string

Store Admin ID

amount*

string

The transaction amount.

currency*

string

The supported transaction currency are "USD".

settleCurrency*

string

The supported settlement currency are "USD".

vendor*

string

The possible payment channels are "alipay", "wechatpay", "cashapppay". ("unionpay" not supported yet)

reference*

string

The Invoice Number of the transaction in the merchant's system.

ipnUrl*

string

The Instant Payment Notification Handler URL. IPN URL must be secure.

needQrcode*

string

The possible values are: true or false. The default value is false. If this parameter is true, the Yuansfer system will create the QR Code image. If this parameter is false, the Yuansfer system will not create a QR Code image.

timeout

integer

The timeout in minutes, default value is 120.

verifySign*

string

The parameter signature.

{
    "result": {
        "reference": "test2020102023",
        "amount": "0.11",
        "deepLink": "https://qr.alipay.com/bax05773sia4dshxhw7100f3",
        "transactionNo": "297553638914321581",
        "settleCurrency": "USD",
        "currency": "USD",
        "timeout": "120",
        "qrcodeUrl": "https://mobilecodec.alipaydev.com/show.htm?code=bax05773sia4dshxhw7100f3&picSize=M"
    },
    "ret_code": "000100",
    "ret_msg": "add success"
}

Response

Parameter

Type

Description

result

object

The result object.

ret_msg

string

The response return message.

ret_code

string

The response return code. For more details, see here.

Result Object

Parameter

Type

Description

reference

string

The Transaction ID in the Yuansfer system.

amount

number

The transaction amount in USD.

deepLink

string

The deep link URL. (the non-homepage URL).

transactionNo

string

The Invoice Number of the transaction in the Merchant's system.

settleCurrency

string

The supported settlement currency are "USD".

currency

string

The supported transaction currency are "USD".

timeout

integer

The timeout in minutes, default value is 120.

qrcodeUrl

string

The URL of the transaction QR code.

curl -XPOST -H "Content-type: application/json" -d '{
    "merchantNo": "200043",
    "storeNo": "300014",
    "verifySign": "45bfac0286debaf0c316c011d6842d2c",
    "amount": "0.11",
    "currency": "USD",
    "settleCurrency": "USD",
    "needQrcode" "true",
    "reference": "test2020102023",
    "ipnUrl": "http://zk-tys.yunkeguan.com/login/test",
    "needQrcode": "true",
    "vendor": "alipay",
    "timeout": "120"
}' 'https://mapi.yuansfer.com/app-instore/v3/create-trans-qrcode'

Last updated