建立付款交易
介面路徑
| 請求方式 | API 路徑 |
|---|---|
| POST | {DOMAIN_NAME} /api/v1/trade/payment/create |
請求電文
Http.header 參數
Content-TypeString必填
固定值:application/json
platformIdString選填
SLP 平台 ID,平台特店必填
merchantIdString必填
直連特店串接:SLP 分配的特店 ID;平台特店串接:SLP 分配的子特店 ID
apiKeyString必填
API 介面金鑰
requestIdString(32)必填
請求流水號,每個 HTTP 請求唯一
idempotentKeyString(32)選填
冪等 KEY
Http.body 封包
acquirerTypeString(6)必填
串接模式,固定填:SDK
referenceOrderIdString(32)必填
特店訂單號
amountAmount必填
金额
valueNumber(14)必填
金額,台幣傳金額*100,譬如1元傳入100
currencyString必填
幣種,目前僅支援 TWD
languageString(6)必填參考
語言
expireTimeInteger選填
部分付款方式支援,如 ATM 銀行轉帳等,單位 min
returnUrlString(256)必填
顧客付款完成之後回到特店的頁面
paySessionJSON String必填
PaySession相關,SDK 資訊,直接從 SDK 獲取傳入即可
passthroughString(256)選填
透傳資訊,response 原路回應
orderPurchaseOrder必填
交易訂單資訊
purchaseSceneString(16)選填參考
消費场景
productsArray<Product>必填
商品列表資訊,SLP 智慧風控必需
idString(64)必填
商品編號
nameString(128)必填
商品名稱
quantityInteger必填
商品數量
amountAmount必填
金额
valueNumber(14)必填
金額,台幣傳金額*100,譬如1元傳入100
currencyString必填
幣種,目前僅支援 TWD
descString(512)選填
商品描述
urlString(256)選填
商品連結地址
skuString(64)選填
商品 sku 編號
shippingShipping必填
物流訂單資訊,SLP 智慧風控必需
shippingMethodString(64)必填
物流方式,如超商取貨/宅配等;
carrierString(64)必填
物流通道,如黑貓宅配等;
personalInfoPersonalInfo必填
收貨人資訊
firstNameString(128)選填
顧客名字,firstName 和 lastName 加總長度不可超過 128
lastNameString(128)必填
顧客名字,firstName 和 lastName 加總長度不可超過 128
emailString(128)選填
顧客郵箱,郵箱和電話二者需至少傳入其一
phoneString(64)選填
顧客電話,需帶國碼,舉例 +6287654321876,郵箱和電話二者需至少傳入其一
addressAddress必填
物流送貨地址
countryCodeString(2)必填參考
國家地區編碼,如 TW
stateCodeString(12)選填
州或省代碼
stateString(128)選填
州或省名稱
cityString(128)選填
城市名稱
districtString(128)選填
區域
streetString(128)必填
詳細街道地址
postcodeString(32)選填
邮政編碼
billingBillingInfo必填
帳單資訊
descriptionString(32)選填
帳單描述
personalInfoPersonalInfo必填
收貨人資訊
firstNameString(128)選填
顧客名字,firstName 和 lastName 加總長度不可超過 128
lastNameString(128)必填
顧客名字,firstName 和 lastName 加總長度不可超過 128
emailString(128)選填
顧客郵箱,郵箱和電話二者需至少傳入其一
phoneString(64)選填
顧客電話,需帶國碼,舉例 +6287654321876,郵箱和電話二者需至少傳入其一
addressAddress必填
物流送貨地址
countryCodeString(2)必填參考
國家地區編碼,如 TW
stateCodeString(12)選填
州或省代碼
stateString(128)選填
州或省名稱
cityString(128)選填
城市名稱
districtString(128)選填
區域
streetString(128)必填
詳細街道地址
postcodeString(32)選填
邮政編碼
confirmConfirmOptions必填
付款項內容
paymentMethodString(16)必填參考
付款方式
subPaymentMethodString(16)選填
子付款方式
autoConfirmBoolean選填
自動確認,默認為 false
autoCaptureBoolean選填
自動請款,默認為 true
autoSettleBoolean選填
自動結算
paymentBehaviorString(32)必填參考
付款場景
paymentCustomerIdString(32)選填
SHOPLINE Payments 付款會員 ID,快捷付款、定期扣款場景必填
paymentInstrumentPaymentInstrument選填
付款工具資訊
paymentInstrumentIdString(32)選填
付款工具 ID
savePaymentInstrumentBoolean選填
是否要儲存付款工具
customerCustomer必填
顧客資訊,SLP智慧風控必需
referenceCustomerIdString(32)必填
顧客唯一標識,需為唯一值
typeString(1)選填參考
顧客類型
personalInfoPersonalInfo必填
顧客資訊
firstNameString(128)選填
顧客名字,firstName 和 lastName 加總長度不可超過 128
lastNameString(128)必填
顧客名字,firstName 和 lastName 加總長度不可超過 128
emailString(128)選填
顧客郵箱,郵箱和電話二者需至少傳入其一
phoneString(64)選填
顧客電話,需帶國碼,舉例 +6287654321876,郵箱和電話二者需至少傳入其一
genderString(1)選填參考
性別
identityTypeString(20)選填
顧客身份證件類型,特定國家需要
identityNumberString(64)選填
顧客身份證件號碼,特定國家需要
clientClientInfo必填
終端資訊
ipString(32)必填
顧客付款使用的 IP 地址,若 paymentBehavior 為定期扣款 Recurring,可填入特店辦公室 IP
screenWidthString(16)選填
螢幕寬度(單位:像素)
screenHeightString(16)選填
螢幕高度(單位:像素)
javaEnabledString(16)選填
持卡人終端是否能夠執行 Java
timeZoneOffsetString(16)選填
時區,持卡人瀏覽器本地時間和UTC 時間之間的時差,以分鐘為單位。 值從 getTimezoneOffset() 方法回應
transactionWebSiteString(512)選填
使用者瀏覽器目前 domain
userAgentString(128)選填
瀏覽器使用者代理程式資訊 範例值:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36
languageString(32)選填
瀏覽器的 navigator.language 值
colorDepthString(16)選填
視窗顏色, 取得瀏覽器 screen.colorDepth 範例值: 32
acceptString(128)選填
瀏覽器 Accept 頭資訊
additionalDataMap選填
附加資訊
回應電文
處理結果 http.statusCode
* 500 /429 /400:處理異常
* 200:處理成功
acquirerTypeString(6)必填
串接模式,固定填:SDK
referenceOrderIdString(32)必填
特店訂單號
tradeOrderIdString(32)必填
SLP 付款交易訂單編號
sessionIdString(32)選填
SLP 結帳交易訂單編號
statusString(32)必填參考
付款狀態
subStatusString(32)必填參考
子付款狀態,採用手動請款時需要關注此參數;
paymentMsgPaymentError選填
付款失敗原因
actionTypeString(16)選填參考
指示下一步動作,對應 nextAction 欄位處理方式
nextActionNextAction選填
指示下一步動作,特店可忽略,傳送給 SDK 即可
orderObject必填
SLP 訂單資訊
merchantIdString(32)必填
特店 ID
amountCurrencyAmount必填
订单金額
valueNumber(14)必填
金額,台幣傳金額*100,譬如1元傳入100
currencyString必填
幣種,目前僅支援 TWD
referenceOrderIdString(32)必填
特店訂單號
createTimeString(32)必填
訂單建立時間
customerCustomer必填
顧客資訊
referenceCustomerIdString(32)必填
顧客唯一標識,需為唯一值
customerIdString(32)必填
SLP 會員 ID,在 purchaseScene 為純綁卡/綁卡及付款/定期扣款時,會建立 SLP 會員
paymentObject必填
訂單付款資訊
paymentMethodString(16)必填參考
付款方式
subPaymentMethodString(16)選填
子付款方式
autoConfirmBoolean選填
自動確認,默認為 false
autoCaptureBoolean選填
自動請款,默認為 true
paymentBehaviorString(32)必填參考
付款場景
paymentSuccessTimeString(32)選填
付款成功时间
autoSettleBoolean選填
自動結算
isSettleBoolean必填
已結算,默認為 false
paidAmountCurrencyAmount必填
實際付款金額,採用手動請款時需要關注此參數
valueNumber(14)必填
金額,台幣傳金額*100,譬如1元傳入100
currencyString必填
幣種,目前僅支援 TWD
channelDealIdString選填
第三方平台流水號,街口支付和 LINE Pay 特店對帳使用
paymentCustomerIdString(32)選填
SHOPLINE Payments 付款會員 ID,快捷付款、定期扣款場景必填
creditCardObject選填
信用卡付款資訊
typeString必填參考
卡類型
binString必填
卡號前六位
last4String必填
卡號後四位
categoryString選填
卡類別
issuerString選填
發卡行
issuerCountryString選填
發卡國家
brandString選填
卡組織
virtualAccountObject選填
虛擬帳號付款資訊
dueDateString必填
轉帳截止日期
dueDateDescString必填
轉帳截止日期說明
recipientAccountNumString必填
轉帳虛擬帳號
recipientBankCodeString必填
轉帳虛擬帳號銀行代碼
paymentAccountNumString選填
付款人轉出帳號
paymentBankCodeString選填
付款人轉出帳號銀行代碼
paymentInstrumentPaymentInstrument選填
付款工具資訊
paymentInstrumentIdString選填
付款工具 ID
savePaymentInstrumentString選填
是否要儲存付款工具 ID
paymentMethodOptionsPaymentMethodOptions選填
付款方式可選資訊
installmentsInstallments選填
支援分期的付款方式的分期資訊
countString選填
分期期數
installDownPayString(12)選填
首期金額,台幣金額*100,譬如1元為100
installPayString(12)選填
每期金額,台幣金額*100,譬如1元為100
additionalDataMap選填
附加資訊