跳到主要内容

Payment Element SDK API

Create payment intent API

Endpoint : /payment_element/v1/create_payment_intent

Method : POST

Header nameMandatoryDescription
X-QF-APPCODEYes商戶code
X-QF-SIGNYes商戶 key

Request Parameters

AttributeMandatoryDescription
txamtYes支付金额,单位分
txcurrcdNo币种 e.g. HKD/ CNY (ISO_4217)
pay_typeYes支付类型 e.g. WP credit card: 802801
out_trade_noYes外部订单号
mchidNomchid, 渠道用
return_urlNo支付成功跳转页面
failed_urlNo支付失败跳转页面
notify_urlNo交易通知发送地址

Response Parameters

{
"respcd": "0000",
"txamt": "123",
"txcurrcd": "123",
"sysdtm": "2022-11-14 16:15:16",
"out_trade_no": "501871840",
"payment_intent": "38aec7cef8564f309ea2265a454b8ca5",
"intent_expiry": "2022-11-15 12:34:34"
}

Create token intent API

Endpoint : /payment_element/v1/create_token_intent

Method : POST

Header

Header nameMandatoryDescription
X-QF-APPCODEYes商戶code
X-QF-SIGNYes商戶 key

Request Parameters

AttributeMandatoryDescription
mchidNomchid, 渠道用
customer_idYes顧客id
token_expiryNotoken到期日
token_reasonNotoken 建立原因
token_referenceNotoken 參考
notify_urlNo交易通知发送地址

Response Parameters

{
"respcd": "0000",
"sysdtm": "2022-11-14 16:15:16",
"token_intent": "38aec7cef8564f309ea2265a454b8ca5",
"intent_expiry": "2022-11-15 12:34:34"
}