接受重复性销售
在使用客户存储的卡详情发起支付并向即时触发结算流程时,可以使用我们的重复性销售资源。 请在
什么是重复性支付?
- 在您的客户在授权点未主动参与时由流程触发的交易
- 只能在您的客户通过身份验证并同意一项委付款项时作为原始预存卡号的后续予以执行
- 您必须声明所有重复性支付的用途,包括订阅、分期或计划外
- 有时也被称为商户发起的交易 (MIT)
前提条件
您必须
重复性销售
如果您存储了卡详情,则可以使用我们的重复性销售资源来授权和结算商户发起的交易。
POST
您发至在成功的cardOnFile
智能dynamicCardOnFile
payments:recurringSale
操作链接中的重复性销售请求。
重复性销售示例请求
POST https://try.access.worldpay.com/payments/sales/recurring/{resource}
单击下表以查看全部支持的 paymentInstrument
参数的所有必需字段。
重复性销售请求正文:
Copied!
{
"transactionReference": "Memory265-13/08/1876",
"merchant": {
"entity": "MindPalaceLtd"
},
"instruction": {
"narrative": {
"line1": "trading name"
},
"paymentInstrument": {
"type": "card/plain",
"cardNumber": "4444333322221111",
"cardExpiryDate": {
"month": 12,
"year": 2020
}
},
"value": {
"currency": "GBP",
"amount": 250
},
"intent": "subscription"
}
}
{ "transactionReference": "Memory265-13/08/1876", "merchant": { "entity": "MindPalaceLtd" }, "instruction": { "narrative": { "line1": "trading name" }, "paymentInstrument": { "type": "card/plain", "cardNumber": "4444333322221111", "cardExpiryDate": { "month": 12, "year": 2020 } }, "value": { "currency": "GBP", "amount": 250 }, "intent": "subscription" } }
{
"transactionReference": "Memory265-13/08/1876",
"merchant": {
"entity": "MindPalaceLtd"
},
"instruction": {
"narrative": {
"line1": "Mind Palace Ltd"
},
"value": {
"currency": "GBP",
"amount": 250
},
"paymentInstrument": {
"type": "card/token",
"href": "https://try.access.worldpay.com/tokens/{}"
},
"intent": "unscheduled"
}
}
{ "transactionReference": "Memory265-13/08/1876", "merchant": { "entity": "MindPalaceLtd" }, "instruction": { "narrative": { "line1": "Mind Palace Ltd" }, "value": { "currency": "GBP", "amount": 250 }, "paymentInstrument": { "type": "card/token", "href": "https://try.access.worldpay.com/tokens/{}" }, "intent": "unscheduled" } }
重复性销售请求参数的描述
参数 | 必需 | 描述 |
---|---|---|
transactionReference | 由您生成的独特参考号,用于在支付的整个生命周期中对其进行识别。请参见 | |
merchant | 包含有关商户信息的对象。 | |
merchant.entity | 确定您支付的方向,以协助开单、报告和对账。这对于身份验证和查询为必需。 请联系您的实施经理了解更多详情。 | |
instruction | 包含与支付相关的所有信息的对象。 | |
instruction.intent | 详细说明此具体重复性协议原因的参数。有效用途:
| |
instruction.narrative | 出现在您的客户对账单上的文本。用于识别商户。 请参见 | |
narrative.line1 | 出现在您客户的对账单上的叙述文字的第一行(最多 24 个字符。如果不支持某个字符,则以空格代替)。 请参见 line1 格式 | |
instruction.value | 包含有关支付值信息的对象。 | |
value.currency | 3 位数货币代码。 请参见 | |
value.amount | 支付金额。这是一个包含小数位的整数,e.g.,如果小数位是二,则 250 就表示 2.50.您可以在我们的 | |
instruction.paymentInstrument | 包含支付类型和详情的对象。 若要将 Token 作为 paymentInstrument 使用,您必须首先创建 Token,请参见我们有关如何创建 Token 的 | |
payoutInstrument.cardExpiryDate | 包含您的客户卡过期日期的对象。 对所有 "type": "card/plain" 请求为必需。 | |
payoutInstrument.cardNumber | 包含您的客户卡号的对象。对 "type": "card/plain" 请求为必需。 |
销售请求中的可选字段
以下请求包含成功的重复性销售请求所需的所有必需和可选字段。完整请求架构也可在我们的
完整重复性销售请求正文
Copied!
{
"transactionReference": "Memory265-13/08/1876",
"merchant": {
"entity": "MindPalaceLtd",
"mcc": "6432",
"paymentFacilitator": {
"pfId": "12345",
"isoId": "12345",
"subMerchant": {
"name": "John",
"merchantId": "12345",
"postalCode": "SW1 1AA",
"street": "Regent Street",
"city": "London",
"state": "WSM",
"countryCode": "826",
"taxId": "ABC-123456789",
"email": "test@email.com",
"telephone": "+447987 654321"
}
}
},
"instruction": {
"narrative": {
"line1": "Mind Palace Ltd",
"line2": "Memory265-13/08/1876"
},
"scheme": {
"reference": "28379213"
},
"value": {
"currency": "GBP",
"amount": 250
},
"paymentInstrument": {
"billingAddress": {
"address1": "221B Baker Street",
"address2": "Marylebone",
"address3": "Westminster",
"postalCode": "NW1 6XE",
"city": "London",
"state": "Greater London",
"countryCode": "GB"
},
"type": "card/plain",
"cardHolderName": "Sherlock Holmes",
"cardNumber": "4444333322221111",
"cardExpiryDate": {
"month": 12,
"year": 2020
}
},
"intent": "instalment"
}
}
{ "transactionReference": "Memory265-13/08/1876", "merchant": { "entity": "MindPalaceLtd", "mcc": "6432", "paymentFacilitator": { "pfId": "12345", "isoId": "12345", "subMerchant": { "name": "John", "merchantId": "12345", "postalCode": "SW1 1AA", "street": "Regent Street", "city": "London", "state": "WSM", "countryCode": "826", "taxId": "ABC-123456789", "email": "test@email.com", "telephone": "+447987 654321" } } }, "instruction": { "narrative": { "line1": "Mind Palace Ltd", "line2": "Memory265-13/08/1876" }, "scheme": { "reference": "28379213" }, "value": { "currency": "GBP", "amount": 250 }, "paymentInstrument": { "billingAddress": { "address1": "221B Baker Street", "address2": "Marylebone", "address3": "Westminster", "postalCode": "NW1 6XE", "city": "London", "state": "Greater London", "countryCode": "GB" }, "type": "card/plain", "cardHolderName": "Sherlock Holmes", "cardNumber": "4444333322221111", "cardExpiryDate": { "month": 12, "year": 2020 } }, "intent": "instalment" } }
{
"transactionReference": "Memory265-13/08/1876",
"merchant": {
"entity": "MindPalaceLtd",
"mcc": "1000",
"paymentFacilitator": {
"pfId": "12345",
"isoId": "12345",
"subMerchant": {
"name": "John",
"merchantId": "12345",
"postalCode": "SW1 1AA",
"street": "Regent Street",
"city": "London",
"state": "WSM",
"countryCode": "826",
"taxId": "ABC-123456789",
"email": "test@email.com",
"telephone": "+447987 654321"
}
}
},
"instruction": {
"narrative": {
"line1": "Mind Palace Ltd",
"line2": "Memory265-13/08/1876"
},
"value": {
"currency": "GBP",
"amount": 250
},
"paymentInstrument": {
"type": "card/token",
"href": "https://try.access.worldpay.com/tokens/{}"
},
"intent": "unscheduled"
}
}
{ "transactionReference": "Memory265-13/08/1876", "merchant": { "entity": "MindPalaceLtd", "mcc": "1000", "paymentFacilitator": { "pfId": "12345", "isoId": "12345", "subMerchant": { "name": "John", "merchantId": "12345", "postalCode": "SW1 1AA", "street": "Regent Street", "city": "London", "state": "WSM", "countryCode": "826", "taxId": "ABC-123456789", "email": "test@email.com", "telephone": "+447987 654321" } } }, "instruction": { "narrative": { "line1": "Mind Palace Ltd", "line2": "Memory265-13/08/1876" }, "value": { "currency": "GBP", "amount": 250 }, "paymentInstrument": { "type": "card/token", "href": "https://try.access.worldpay.com/tokens/{}" }, "intent": "unscheduled" } }
附加参数描述
您的完整销售请求中的附加参数描述。
参数 | 必需 | 描述 |
---|---|---|
narrative.line2 | 有关支付的其他详情,e.g.订单号、电话号码。 | |
instruction.debtRepayment | DRI 是为偿还债务而标记某项支付的标志。可能的值:
| |
payoutInstrument.cardHolderName | 包含您客户卡名称的对象。 这不是必需字段,但建议您提供相关信息以提高授权率。如未发送,则默认值为 "Not Supplied"(未提供)。 | |
paymentInstrument.billingAddress | 包含账单邮寄地址信息的对象。如果已包括,则您必须至少
card/plain 支付工具提供。我们的 API 会检查所提交的 AVS,以核实其是否与发卡银行注册的地址相符。如果所提供的地址与注册的地址不符,则意味着该支付存在其他风险。 | |
paymentInstrument.cvc | CVC 是卡背面上的一组 3 或 4 个数字的独特号码。我们的 API 会检查所提供的 CVC 是否与发卡银行留存的 CVC 匹配。 | |
merchant.mcc | 您可以将商户类别代码 (mcc ) 应用于单个请求。如果在mcc 。如果此功能已启用但未提供,则 merchant.mcc 会默认为已配置的值。如需更多信息,请联系您的 | |
merchant.paymentFacilitator | 包含您的支付服务商信息的对象。如果为必需,则您必须发送:
|
重复性销售响应
最佳实践:Access Worldpay 在服务响应的头文件中返回WP-CorrelationId
。我们强烈建议您将此记录下来。我们使用WP-CorrelationId
检查单个服务请求。
成功响应
- HTTP 代码
201
"outcome": "Sent for Settlement"
- 风险因素(仅在发卡机构发现冲突时才返回)
- 发卡机构授权代码
- 方案参考号(由主要银行卡方案支持,但可能不会为所有的方案/地区返回)
退款 、部分退款 、撤销 或跟踪支付活动 的链接- 在您的重复支付协议中的下次支付时使用的授权链接
拒绝的响应
您会接收到:
- HTTP 代码
201
"outcome": "refused"
拒绝代码 - 为拒绝提供更多上下文的
description
- 风险因素(仅在发卡机构发现冲突时才返回)
示例响应
Copied!
{
"outcome": "Sent for Settlement",
"issuer": {
"authorizationCode": "0"
},
"scheme": {
"reference": "1260019172"
},
"riskFactors": [{
"risk": "not_matched",
"type": "cvc"
},
{
"risk": "not_checked",
"detail": "postcode",
"type": "avs"
},
{
"risk": "not_checked",
"detail": "address",
"type": "avs"
}
],
"_links": {
"payments:refund": {
"href": "https://try.access.worldpay.com/payments/settlements/refunds/full/eyJrIjoiazNhYjYzMiJ9"
},
"payments:partialRefund": {
"href": "https://try.access.worldpay.com/payments/settlements/refunds/partials/eyJrIjoiazNhYjYzMiJ9"
},
"payments:reversal": {
"href": "https://try.access.worldpay.com/payments/sales/reversals/eyJrIjoiazNhYjYzMiJ9"
},
"payments:events": {
"href": "https://try.access.worldpay.com/payments/events/eyJrIjoiazNhYjYzMiJ9"
},
"curies": [{
"name": "payments",
"href": "https://try.access.worldpay.com/rels/payments/{rel}",
"templated": true
}],
"payments:recurringSale": {
"href": "https://try.access.worldpay.com/payments/sales/recurring/eyJrIjoiazNhYjYzMiJ9"
}
}
}
{ "outcome": "Sent for Settlement", "issuer": { "authorizationCode": "0" }, "scheme": { "reference": "1260019172" }, "riskFactors": [{ "risk": "not_matched", "type": "cvc" }, { "risk": "not_checked", "detail": "postcode", "type": "avs" }, { "risk": "not_checked", "detail": "address", "type": "avs" } ], "_links": { "payments:refund": { "href": "https://try.access.worldpay.com/payments/settlements/refunds/full/eyJrIjoiazNhYjYzMiJ9" }, "payments:partialRefund": { "href": "https://try.access.worldpay.com/payments/settlements/refunds/partials/eyJrIjoiazNhYjYzMiJ9" }, "payments:reversal": { "href": "https://try.access.worldpay.com/payments/sales/reversals/eyJrIjoiazNhYjYzMiJ9" }, "payments:events": { "href": "https://try.access.worldpay.com/payments/events/eyJrIjoiazNhYjYzMiJ9" }, "curies": [{ "name": "payments", "href": "https://try.access.worldpay.com/rels/payments/{rel}", "templated": true }], "payments:recurringSale": { "href": "https://try.access.worldpay.com/payments/sales/recurring/eyJrIjoiazNhYjYzMiJ9" } } }
{
"outcome": "refused",
"description": "CARD EXPIRED",
"code": "33",
"refusalAdvice": {
"code": "01"
},
"riskFactors": [{
"risk": "not_supplied",
"type": "cvc"
},
{
"risk": "not_checked",
"detail": "address",
"type": "avs"
},
{
"risk": "not_checked",
"detail": "postcode",
"type": "avs"
},
{
"risk": "verificationFailed",
"type": "riskProfile"
}
]
}
{ "outcome": "refused", "description": "CARD EXPIRED", "code": "33", "refusalAdvice": { "code": "01" }, "riskFactors": [{ "risk": "not_supplied", "type": "cvc" }, { "risk": "not_checked", "detail": "address", "type": "avs" }, { "risk": "not_checked", "detail": "postcode", "type": "avs" }, { "risk": "verificationFailed", "type": "riskProfile" } ] }
您必须始终存储并使用 payments:recurringSale
操作链接中返回的链接,以用于您的后续重复性销售请求。
注释:如果出现错误,您可以在我们的
后续步骤