利用 iDEAL 支付
启动 iDEAL 支付,可立即触发结算流程。
接受销售
POST
您的请求到 action:sale
操作链接。
销售示例请求
POST https://try.access.worldpay.com/payments/alternative/action/ideal/sale
iDEAL 销售请求正文:
Copied!
{
"transactionReference": "unique-transactionReference",
"merchant": {
"entity": "an-entity"
},
"instruction": {
"narrative": {
"line1": "trading name"
},
"paymentInstrument": {
"bankCode": "ABN_AMRO",
"type": "ideal"
},
"value": {
"currency": "EUR",
"amount": 250
}
},
"url": {
"successUrl": "http://www.worldpay.com/?successURL",
"failureUrl": "http://www.worldpay.com/?failureURL",
"cancelUrl": "http://www.worldpay.com/?cancelURL",
"pendingUrl": "http://www.worldpay.com/?pendingURL"
}
}
{ "transactionReference": "unique-transactionReference", "merchant": { "entity": "an-entity" }, "instruction": { "narrative": { "line1": "trading name" }, "paymentInstrument": { "bankCode": "ABN_AMRO", "type": "ideal" }, "value": { "currency": "EUR", "amount": 250 } }, "url": { "successUrl": "http://www.worldpay.com/?successURL", "failureUrl": "http://www.worldpay.com/?failureURL", "cancelUrl": "http://www.worldpay.com/?cancelURL", "pendingUrl": "http://www.worldpay.com/?pendingURL" } }
参数描述
参数 | 必需 | 描述 |
---|---|---|
transactionReference | 该交易的独特交易参考号。 | |
merchant.entity | 作为加入流程的一部分而创建,用于在 Access Worldpay 中发送销售请求。 | |
instruction | 包含与销售请求相关的所有支付信息的对象。 | |
instruction.narrative.line1 | 出现在您的客户对账单上的文本。用于识别商户。 请参见 | |
instruction.paymentInstrument | 包含账户详情的对象。 | |
paymentInstrument.bankCode | 客户银行代码。如需获取可能的值,请查看我们 | |
paymentInstrument.type | 支付方式。值:ideal 。 | |
instruction.value | 包含销售值的对象。 | |
instruction.value.currency | 所使用的 currency 的识别码。 | |
instruction.value.amount | 所使用的 amount 的识别码。 | |
url | 包含所有 URL 的对象。 | |
url.successUrl | 在成功完成支付后,用于跳转到客户目标位置的 URL。这由您提供。 | |
url.failureUrl | 支付失败时,用于跳转到客户目标位置的 URL。这由您提供。 | |
url.cancelUrl | 取消付款时,用于跳转到客户目标位置的 URL。这由您提供。 | |
url.pendingUrl | 如果返回待处理的支付状态,用于跳转到客户目标位置的 URL。这由您提供。 |
销售响应
成功支付
您会接收到:
- HTTP 代码
201
- AN
"lastEvent": "pendingAuthorization"
- 银行跳转 URL
示例响应:
Copied!
{
"url": "https://secure-test.worldpay.com/wcc/simulator?op=IDEAL-AuthInit&trxId=442769964003824",
"outcome": "pendingAuthorization",
"_links": {
"action:query": {
"href": "https://try.access.worldpay.com/payments/alternative/action/ideal/query/payment?transactionReference={transactionReference}&entity={entity}"
},
"curies": [{
"name": "action",
"href": "https://try.access.worldpay.com/rels/payments/alternative/action/ideal/{rels}",
"templated": true
}]
}
}
{ "url": "https://secure-test.worldpay.com/wcc/simulator?op=IDEAL-AuthInit&trxId=442769964003824", "outcome": "pendingAuthorization", "_links": { "action:query": { "href": "https://try.access.worldpay.com/payments/alternative/action/ideal/query/payment?transactionReference={transactionReference}&entity={entity}" }, "curies": [{ "name": "action", "href": "https://try.access.worldpay.com/rels/payments/alternative/action/ideal/{rels}", "templated": true }] } }
您收到一个 pendingAuthorization
的 outcome
。这并不意味着付款已全部处理完毕。客户现必须在其手机银行环境中完成付款。
注释:可能需要 20 分钟才能显示此付款的结算详情。
使用“
后续步骤