PaymentIntent Create
建立 - 付款意圖(PaymentIntent)
application/json
Request Body
paymentNo string nullable
付款單號如不指定,系統會自動產生
amount double required
Possible values: < 1000000000000
付款金額
currency string required
Possible values: non-empty
付款幣別
description string nullable
Possible values: <= 255 characters
描述
resultUrl string nullable
轉跳網址
webhookUrl string nullable
webhook 網址
allowedPaymentMethods string[] nullable
允許的付款方式 (預設為全開)
CreditCardInstallment, CreditCard, ATM
allowInstallments int32[] nullable
限制可分期數 (若無則為與後台設定一致)
expireDays int32 nullable
ATM虛擬帳號, 超商繳費代碼 繳費期限 (單位: 天)
Responses
- 200
Success
application/json
Schema
Example (from schema)
Example
Schema
- Array [
- ]
status int32
狀態碼
type string nullable
狀態
message string nullable
訊息
result object
id string nullable
secret string nullable
module string nullable
allowPaymentMethodTypes string[] nullable
amount double
金額
currency string nullable
幣別
description string nullable
說明
status string nullable
狀態
createdAt string nullable
建立時間 ISO 8601
payment object
paymentNo string nullable
付款單號
paymentToken string nullable
付款 Token
amount double
付款金額
currency string nullable
付款幣別
paymentMethod string nullable
付款方式
payerName string nullable
付款人姓名
payerEmail string nullable
付款人 Email
description string nullable
付款描述
transactionNo string nullable
交易編號
status string nullable
訂單狀態, 1:草稿 2:交易成功 3:交易失敗 4:交易待付款 5:交易進行中 6:已過期
createdAt string nullable
付款建立時間
paidAt string nullable
付款完成時間
redirectUrl string nullable
source string nullable
products object[] nullable
name string nullable
description string nullable
price double
currency string nullable
quantity int32
meta nullable
meta object nullable
requestId string nullable
請求 ID
{
"status": 200,
"type": "success",
"message": "success",
"result": {
"id": "pp_e863cd329ccc4a7a88db55832967ee4a",
"secret": "pp_e863cd329ccc4a7a88db55832967ee4a_secret_044a0f84420244d5873d8a7c0cb352bd",
"module": "iframe",
"allowPaymentMethodTypes": [
"CreditCard",
"ATM",
"CreditCardInstallment"
],
"amount": 100,
"currency": "TWD",
"description": "測試付款",
"status": "draft",
"createdAt": "2023-07-21T07:26:51+00:00",
"payment": {
"paymentNo": "string",
"paymentToken": "string",
"amount": 0,
"currency": "string",
"paymentMethod": "string",
"payerName": "string",
"payerEmail": "string",
"description": "string",
"transactionNo": "string",
"status": "string",
"createdAt": "string",
"paidAt": "string",
"redirectUrl": "string",
"source": "string",
"products": [
{
"name": "string",
"description": "string",
"price": 0,
"currency": "string",
"quantity": 0
}
]
},
"meta": {
"allowInstallments": [
{
"installments": 3,
"rate": 3,
"extra": false,
"enabled": true
},
{
"installments": 6,
"rate": 4,
"extra": false,
"enabled": true
},
{
"installments": 9,
"rate": 5,
"extra": false,
"enabled": true
},
{
"installments": 12,
"rate": 6,
"extra": false,
"enabled": true
},
{
"installments": 18,
"rate": 9,
"extra": false,
"enabled": true
},
{
"installments": 24,
"rate": 10,
"extra": false,
"enabled": true
}
]
}
},
"requestId": "a32aaa44-50e4-42bb-a6b1-7709e3d8f0bd"
}
{
"status": 200,
"type": "success",
"message": "",
"result": {
"id": "pp_e863cd329ccc4a7a88db55832967ee4a",
"secret": "pp_e863cd329ccc4a7a88db55832967ee4a_secret_044a0f84420244d5873d8a7c0cb352bd",
"module": "iframe",
"allowPaymentMethodTypes": [
"CreditCard",
"ATM",
"CreditCardInstallment"
],
"amount": 100,
"currency": "TWD",
"description": "測試付款",
"status": "Draft",
"createdAt": "2024-04-02T03:44:04+00:00",
"payment": {
"paymentNo": "PNOT202404020001",
"paymentToken": "b69da67da2124c47b84500f041a3b6de1Msxc1",
"amount": 100,
"currency": "TWD",
"paymentMethod": "CreditCard",
"payerName": "buayalin",
"payerEmail": "service@paynow.com.tw",
"description": "",
"transactionNo": "",
"status": "Draft",
"createdAt": "2024-04-02T03:44:04+00:00",
"paidAt": null,
"redirectUrl": "",
"source": "paynow",
"products": [
{
"name": "餅乾 X 1",
"description": "餅乾 X 1",
"price": 100,
"currency": "TWD",
"quantity": 1
}
],
"meta": null
},
"meta": {
"threeDomainSecureUrl": "https://example.paynow.com.tw/3ds-url"
}
},
"requestId": "aff8f154-6ab4-433a-ba75-3d97d378ac1d"
}
Loading...