Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solution

更多功能

发起授权支付时,您可以根据自身业务需求选择是否使用更多功能。本文为您提供更多功能的详细说明及使用方式。

设置 3D 认证

通过设定 is3DSAuthentication 参数的值,指定某笔交易是否进行 3D 认证:

  • is3DSAuthentication 不设置值:则等同于该参数值为 false 的情况,即该笔交易不触发 3D 验证。若 Antom 判断该笔交易为高风险则直接拒绝本次交易。
  • is3DSAuthentication 值为 false该笔交易不触发 3D 验证。Antom 判断该笔交易为高风险则直接拒绝本次交易。
  • is3DSAuthentication 值为 true该笔交易触发 3D 验证。Antom 判断该笔交易为高风险则直接拒绝本次交易。

注意

  • API 集成方式下,支付 中设置该字段; SDK 集成方式下,在 支付会话创建 接口中设置该字段。
  • 韩国卡组发行的卡在韩国卡组交易网络下进行交易时,不支持此功能。

智能挽回交易

通过设定 enableAuthenticationUpgrade 参数的值为 true,指定某笔交易进行自动挽回:对于您指定的非 3D 认证的交易,当卡组要求该笔交易进行 3D 认证时,Antom 自动路由至 3D 验证流程,让买家参与验证过程,从而挽回失败交易。

如果不使用自动挽回交易功能,对于您指定的非 3D 验证的交易,当卡组要求该笔交易进行 3D 认证时,即卡组认定该笔交易存在风险,如果不进行 3D 验证则支付失败。

注意

  • API 集成方式下,在 支付 接口中设置该字段; SDK 集成方式下,支付会话创建 口中设置该字段。
  • 部分地区卡组发行的卡在该地区卡组交易网络下进行交易时不支持此功能,这些地区包括巴西和韩国。

设置 3D 认证及自动挽回交易这两个功能会共同决定交易的风控验证流程,下表为您展示两个功能的交叉使用情况及对应的风控结果:

设置3D认证:

is3DSAuthentication

自动挽回交易:enableAuthenticationUpgrade

风控结果

false / 不传值

true / 不传值

非 3D 验证的交易失败后,该笔交易自动升级至 3D 验证,Antom 为您返回 3D 验证页面的 URL 。

false / 不传值

false

如果非 3D 验证的交易支付失败,Antom 为您返回交易失败的结果。

true

true / false / 不传值

交易需进行 3D 验证,Antom 为您返回 3D 验证页面的 URL 。

表 1. 3D 认证及自动挽回交易设置影响的风控结果

SDK 集成方式下,SDK 将负责处理 3D 验证页面的跳转,对于 3D 页面的跳转您无需做额外处理API 集成方式下, Antom 为您返回 3D 验证页面的URL后,您需要为买家展示 3D 验证页面并推进用户完成 3D验证。以下示例展示了 支付 请求的响应中为您返回 3D 验证页面URL的场景:

copy
{
  "result": {
    "resultStatus": "U",
    "resultCode": "PAYMENT_IN_PROCESS",
    "resultMessage": "payment in process"
  },
  "normalUrl": "https://centinelapi.cardinalcommerce.com/V1/Cruise/Collect/...",
  "paymentId": "20221111194010890100111650285726898",
  "paymentRequestId": "amsdmpay_cangxi_lj_20221111_104718_672",
  "redirectActionForm": {
    "redirectUrl": "https://centinelapi.cardinalcommerce.com/V1/Cruise/Collect/...",
    "method": "GET"
  },
  "paymentAmount": {
    "currency": "HKD",
    "value": "100"
  },
  "paymentCreateTime": "2022-11-10T18:47:20-08:00"
}

增值风控服务

如果您需求交易维度的升级风控服务,可购买 Antom 提供的增值风控服务。该服务可根据交易的风险等级,智能决策风控策略。

本功能与 设置3D认证 自动挽回交易 可结合使用,共同决定交易的风控验证流程,下表为您展示这三种功能的交叉使用情况及对应的风控结果:

增值风控

设置3D认证

(is3DSAuthentication)

自动挽回交易(enableAuthenticationUpgrade)

风控结果

开通

false / 不传值

false

由风控服务决策是否进行 3D 验证。

开通

false / 不传值

true / 不传值

由风控服务决策是否进行 3D 验证。若决策结果为非 3D 验证且首次授权支付时卡组要求进行 3D 验证,Antom 为您返回 3D 验证页面的 URL 。

开通

true

false / true / 不传值

即使风控服务决策结果为非 3D 验证,交易仍进行 3D 验证,Antom 为您返回 3D 验证页面的 URL 。

表 2. 增值风控开通下不同设置所影响的风控结果

注意

  • 若您购买了增值风控服务,建议无需设置 is3DSAuthentication 参数,有增值风控服务为您提供风控决策。
  • 部分地区卡组发行的卡在该地区卡组交易网络下进行交易时不支持此功能,这些地区包括巴西和韩国。

AVS 验证

地址验证系统(AVS)用于验证账单地址是否与信用卡持卡人的地址匹配,可有效防止欺诈交易的发生。当您开通 AVS 校验服务后,当买家输入持卡人的账单地址和邮编后,AVS 系统会将该信息与发卡机构中存储的对应信息进行比对,如果该信息与发卡机构记录中的信息不匹配,则交易可能会被拒绝或需要进行额外的身份验证。支付 AVS 验证可帮助减少信用卡欺诈风险。

开通 AVS 校验服务后,在不同集成方式下,您需要采取不同的方式发起 AVS 校验:

  • 在 API 集成方式下:
    • 如果您使用服务器对服务器模式,则需在调用 支付 接口时传入 billingAddress 参数以发起 AVS 校验。
    • 如果您使用托管表单模式,Antom 为用户提供支付信息收集页,在该页面会要求买家填写账单地址等信息,您无需做额外处理。
  • 在 SDK 集成方式下,SDK 为用户提供支付信息收集页,在该页面会要求买家填写账单地址等信息,您无需做额外处理。

注意

  • 您可通支付结果通知 查询支付结果 响应的 avsResultRaw 字段获得 AVS 校验的结果。
  • 仅美国卡组发行的卡在美国卡组交易网络下进行交易时,支持此功能。

存储卡信息

您可以为买家提供绑卡服务,即支持买家在首次支付时选择存储卡信息,以便下次支付时无需再次输入卡信息。下图展示了用户选择绑卡后,再次支付时的下单页面:

image

图 1. 用户绑卡后续支付页面

API 集成方式

在不同集成方式下,您需要采取不同的方式实现买家绑卡的功能。在 API 集成方式下,针对服务器对服务器模式和托管表单模式,您需要执行下述相应操作:

在服务器对服务器模式下,收集完买家卡信息后,您可以选择自己存储卡信息或者让 Antom 来帮助您存储卡信息。

  • Antom 存储卡信息(推荐)

当买家在您的页面上选择存储卡片信息,您需要将收集好的卡信息通过 支付 接口传给 Antom 并指定 tokenize 字段为 trueAntom 会将卡信息生成对应的卡令牌 (cardToken),授权支付成功后,您可以通过接收异步通知或通过 查询支付结果 接口主动查询的方式获取卡令牌 (cardToken) 及脱敏后的卡号 (cardNo)。您需将获取到的卡令牌与脱敏卡号等信息与买家信息进行关联并存储,以用于后续支付。

以下示例展示了 Antom 存储卡信息模式下,您需要发送给 Antom支付 请求:

copy
{
  "settlementStrategy": {
    "settlementCurrency": "EUR"
  },
  "productCode": "CASHIER_PAYMENT",
  "paymentNotifyUrl": "http://gol.alipay.net:8080/amsdemo/record/notify?env=main_GROUP&paymentMethodType=CARD",
  "paymentRequestId": "2****************2",
  "paymentRedirectUrl": "http://gol.alipay.net:8080/amsdemo/result?paymentRequestId=2023070458941025622196",
  "paymentFactor": {
    "isAuthorization": true
  },
  "paymentMethod": {
    "paymentMethodMetaData": {
      "recurringType": "",
      "cvv": "123",
      "is3DSAuthentication": false,
      "isCardOnFile": false,
      "expiryMonth": "05",
      "tokenize": true,
      "expiryYear": "26",
      "billingAddress": {
        "zipCode": "310000",
        "address2": "gongzhuan Road",
        "city": "hangzhou",
        "state": "zhejiang",
        "region": "CN"
      },
      "cardNo": "****1846"
    },
    "paymentMethodType": "CARD"
  },
  "paymentExpiryTime": "2025-11-27T12:00:01+08:30",
  "paymentAmount": {
    "currency": "EUR",
    "value": "8204"
  },
  "merchantRegion": "",
  "order": {
    "orderAmount": {
      "currency": "EUR",
      "value": "8204"
    },
    "referenceOrderId": "2********************0",
    "shipping": {
      "shippingName": {
        "firstName": "Li",
        "lastName": "Kyle",
        "fullName": "Kyle Li"
      },
      "shippingCarrier": "DHL",
      "shippingPhoneNo": "**********19",
      "shipToEmail": "exam***@163.com",
      "shippingAddress": {
        "zipCode": "310000",
        "address2": "gongzhuan Road",
        "city": "hangzhou",
        "state": "zhejiang",
        "region": "CN"
      }
    },
    "goods": [
      {
        "referenceGoodsId": "2******************7",
        "goodsUrl": "qinghailipipeng",
        "goodsCategory": "chemical",
        "goodsUnitAmount": {
          "currency": "EUR",
          "value": "8204"
        },
        "goodsQuantity": "1",
        "goodsName": "boom",
        "goodsSkuName": "boom boom room",
        "goodsBrand": "antom boom"
      }
    ],
    "env": {
      "clientIp": "1.1.1.1",
      "osType": "IOS",
      "terminalType": "WAP"
    },
    "orderDescription": "ANTOM_ZZ",
    "buyer": {
      "referenceBuyerId": "2******************7",
      "buyerName": {
        "firstName": "Li",
        "lastName": "Kyle",
        "fullName": "Kyle Li"
      }
    }
  }
}

当绑卡买家再次进行支付时,您需要完成以下操作:

  1. 在收银台页面为买家展示脱敏后的卡信息。
  2. 调用 支付 接口,并传入以下参数:
  1. paymentMethodId: 值为 cardToken 的参数值(cardToken 可从原始绑卡交易对应的 支付异步通知查询支付结果 接口返回的 paymentResultInfo 中获取)。
  2. 额外支付验证信息字段(例如巴西卡的 cpf 字段)。
  3. isCardOnFile: 值为 true,用于标记该笔交易为绑卡买家的再次交易。

以下示例展示了绑卡用户再次支付时,使用 Alipay 返回的卡令牌调用 支付 接口的请求:

copy
{
  "settlementStrategy": {
    "settlementCurrency": "EUR"
  },
  "productCode": "CASHIER_PAYMENT",
  "paymentNotifyUrl": "http://gol.alipay.net:8080/amsdemo/record/notify?env=main_GROUP&paymentMethodType=CARD",
  "paymentRequestId": "2****************2",
  "paymentRedirectUrl": "http://gol.alipay.net:8080/amsdemo/result?paymentRequestId=2023070471913565376977",
  "paymentFactor": {
    "isAuthorization": true
  },
  "paymentMethod": {
    "paymentMethodId": "A********************************************************************************************=",
    "paymentMethodMetaData": {
      "recurringType": "SCHEDULED",
      "is3DSAuthentication": false,
      "isCardOnFile": true,
      "networkTransactionId": "2*************5"
    },
    "paymentMethodType": "CARD"
  },
  "paymentExpiryTime": "2025-11-27T12:00:01+08:30",
  "paymentAmount": {
    "currency": "EUR",
    "value": "3063"
  },
  "merchantRegion": "",
  "order": {
    "orderAmount": {
      "currency": "EUR",
      "value": "3063"
    },
    "referenceOrderId": "2****************1",
    "shipping": {
      "shippingName": {
        "firstName": "Li",
        "lastName": "Kyle",
        "fullName": "Kyle Li"
      },
      "shippingCarrier": "DHL",
      "shippingPhoneNo": "**********119",
      "shipToEmail": "exam***@163.com",
      "shippingAddress": {
        "zipCode": "310000",
        "address2": "gongzhuan Road",
        "city": "hangzhou",
        "state": "zhejiang",
        "region": "CN"
      }
    },
    "goods": [
      {
        "referenceGoodsId": "2********************9",
        "goodsUrl": "qinghailipipeng",
        "goodsCategory": "chemical",
        "goodsUnitAmount": {
          "currency": "EUR",
          "value": "3063"
        },
        "goodsQuantity": "1",
        "goodsName": "boom",
        "goodsSkuName": "boom boom room",
        "goodsBrand": "antom boom"
      }
    ],
    "env": {
      "clientIp": "1.1.1.1",
      "osType": "IOS",
      "terminalType": "WAP"
    },
    "orderDescription": "ANTOM_ZZ",
    "buyer": {
      "referenceBuyerId": "K*****************3",
      "buyerName": {
        "firstName": "Li",
        "lastName": "Kyle",
        "fullName": "Kyle Li"
      }
    }
  }
}
  • 自行存储卡信息

当买家在商家页面上选择存储卡片信息后,您需在服务端将买家信息和对应的卡信息关联存储。当买家再次发起支付时,您需在调用 支付 接口时传入卡信息,并指定 isCardOnFile 参数的值为 true 。该字段用于标记此交易为绑卡用户的再次交易,有助于提升交易成功率。

以下示例展示了绑卡用户再次支付时,您的服务端调用 支付 接口的请求示例:

copy
{
  "env": {
    "terminalType": "APP",
    "clientIp": "112.80.248.78",
    "deviceId": "eYOIkvFpZzztgO0Yu6USdprBQZCWxDhiUAHCiK8K/cH9mT6wMaMO****",
    "osType": "IOS",
    "deviceLanguage": "zh_CN",
    "colorDepth": 48,
    "screenHeight": 768,
    "screenWidth": 1024,
    "timeZoneOffset": 1
  },
  "order": {
    "orderAmount": {
      "currency": "EUR",
      "value": "30000"
    },
    "orderDescription": "Cappuccino #grande (Mika's coffee shop)",
    "referenceOrderId": "ORDER_2022111414171****",
    "goods": [
      {
        "referenceGoodsId": "383382011_SGAMZ-90452****",
        "goodsName": "[3 Boxes] Starbucks Cappuccino Milk Coffee Pods / Coffee Capsules by Nescafe Dolce Gusto",
        "goodsUrl": "https://www.lazada.sg/products/3-boxes-starbucks-cappuccino-milk-coffee-pods-coffee-capsules-by-nescafe-dolce-gusto-i383382011-s904520356.html?clickTrackInfo=undefined&search=1&source=search&spm=a2o42.searchlist.list.3",
        "goodsCategory": "Digital  Goods/Digital  Vouchers/Food  and Beverages",
        "goodsUnitAmount": {
          "currency": "EUR",
          "value": "30000"
        },
        "goodsQuantity": "10"
      }
    ],
    "shipping": {
      "shippingName": {
        "firstName": "Dehua",
        "lastName": "Liu",
        "fullName": "Dehua Skr Liu",
        "middleName": "Skr"
      },
      "shippingAddress": {
        "zipCode": "310000",
        "address2": "Xihu",
        "city": "Hangzhou",
        "address1": "Wuchang road",
        "state": "Zhejiang",
        "region": "CN"
      },
      "shippingCarrier": "FedEx",
      "shippingPhoneNo": "1234567****",
      "shipToEmail": "test@gmail.com"
    },
    "buyer": {
      "referenceBuyerId": "test12345678",
      "buyerPhoneNo": "1234567****",
      "buyerEmail": "alipay@alipay.com",
      "buyerName": {
        "firstName": "Dehua",
        "lastName": "Liu",
        "fullName": "Dehua Skr Liu",
        "middleName": "Skr"
      }
    }
  },
  "paymentAmount": {
    "currency": "EUR",
    "value": "30000"
  },
    "paymentMethod": {
    "paymentMethodType": "CARD",
    "paymentMethodMetaData": {
    "isCardOnFile": true,
    "enableAuthenticationUpgrade": false,
    "is3DSAuthentication": false,
    "cardholderName": {
    "firstName": "Tom",
    "lastName": "Jay"
  },
    "expiryMonth": "12",
    "billingAddress": {
    "zipCode": "310000",
    "address2": "Xihu",
    "city": "Hangzhou",
    "address1": "Wuchang road",
    "state": "Zhejiang",
    "region": "CN"
  },
    "expiryYear": "29",
    "cardNo": "411734780615****"
  }
  },
    "settlementStrategy": {
    "settlementCurrency": "EUR"
  },
    "paymentNotifyUrl": "https://www.alipay.com/notify",
    "paymentRedirectUrl": "https://www.alipay.com",
    "paymentRequestId": "PAY_2022111414171****",
    "productCode": "CASHIER_PAYMENT",
    "paymentFactor": {
    "isAuthorization": true
  }
  }

SDK 集成方式

此方式下,SDK 为您的买家提供信息收集页面,在该页面上买家完成卡信息输入后,可选择保存卡信息,以便再次支付时无需重复输入卡信息。当买家选择保存卡信息后,Antom 存储买家的卡信息并生成对应的卡令牌(cardToken) 。授权支付成功后,您可以通过接收异步通知或主动调用 查询支付结果 ,获取买家的卡支付信息(cardInfo 字段),该信息包括卡令牌(cardToken) 及脱敏后的卡信息。

当绑卡用户再次进行支付时,您需要在调用 支付会话创建 求时设置 paymentMethodId 参数值为 cardToken 的值。以下示例展示了绑卡用户再次支付时,您的服务端调用 支付会话创建 接口的请求示例:

copy
{
    "productCode": "CASHIER_PAYMENT",
    "paymentRequestId": "55bf93a6-71a1-4ca9-b014-53273bd674eb",
    "order": {
        "referenceOrderId": "926e1c32-4a6c-442e-b5ce-8ec5b902e18c",
        "orderDescription": "xxxxx",
        "orderAmount": {
            "currency": "BRL",
            "value": "100"
        },
        "buyer": {
            "referenceBuyerId": "yeiasdasda",
            "buyerPhoneNo": "134******71"
        }
    },
    "paymentAmount": {
        "currency": "BRL",
        "value": "100"
    },
    "paymentMethod": {
        "paymentMethodType": "CARD",
        "paymentMethodId": "alipayCardToken"
    },
    "paymentRedirectUrl": "https://www.yourMerchantWeb.com",
    "paymentNotifyUrl": "https://www.yourNotifyUrl",
    "paymentFactor": {
        "isAuthorization": true
    },
    "settlementStrategy": {
        "settlementCurrency": "EUR"
    }
}

MIT 交易

卡授权支付场景下的自动扣款交易,也被称为Merchant-initiated Transactions (MIT) 交易,即在用户未参与的情况下发起定期或非定期的交易

注意

  • 此场景下的交易均为非 3D 验证的交易。
  • 发起并完成 MIT 交易的前提是您已经获取了买家的授权以完成后续的 MIT 交易,买家需在首次授权支付时完成 3D 验证。
  • 部分地区卡组发行的卡在该地区卡组交易网络下进行交易时不支持此功能,这些地区包括:巴西、韩国、智利、墨西哥和秘鲁。

MIT 交易仅支持通过 支付 接口完成,请注意以下参数的设置:

  • isCardOnFile: 值为 true,用于标记该笔交易为绑卡买家的再次支付。
  • recurringType:值为 SCHEDULEDUNSCHEDULED用于指定该笔交易为定期扣款或非定期扣款。
  • networkTransactionId系统需要确认您已经获取了买家的授权以完成后续的 MIT 交易,因此,您需要通过此字段传入买家进行初始授权支付时卡组分配的用于识别授权支付交易的唯一 ID。当买家首次授权支付成功后,您通过 支付结果通知 或 查询支付结果 请求的响应均可以获得该授权支付交易唯一 ID。

服务器对服务器模式及托管表单模式均支持自动扣款功能。以下示例以服务器对服务器模式为例,展示调用 支付 接口发起 MIT 交易的请求示例:

copy
{
    "env": {
        "browserInfo": {
            "acceptHeader": "*/*",
            "javaEnabled": true,
            "javaScriptEnabled": true,
            "language": "zh_CN",
            "userAgent": "Chrome/100"
        },
        "terminalType": "APP",
        "clientIp": "112.80.248.78",
        "deviceId": "eYOIkvFpZzztgO0Yu6USdprBQZCWxDhiUAHCiK8K/cH9mT6wMaMOzAKe",
        "osType": "IOS",
        "deviceLanguage": "zh_CN",
        "colorDepth": 48,
        "screenHeight": 768,
        "screenWidth": 1024,
        "timeZoneOffset": 1
    },
    "order": {
        "orderAmount": {
            "currency": "EUR",
            "value": "30000"
        },
        "orderDescription": "Cappuccino #grande (Mika's coffee shop)",
        "referenceOrderId": "ORDER_20221114141714891",
        "goods": [
            {
                "referenceGoodsId": "383382011_SGAMZ-904520356",
                "goodsName": "[3 Boxes] Starbucks Cappuccino Milk Coffee Pods / Coffee Capsules by Nescafe Dolce Gusto",
                "goodsUrl": "https://www.lazada.sg/products/3-boxes-starbucks-cappuccino-milk-coffee-pods-coffee-capsules-by-nescafe-dolce-gusto-i383382011-s904520356.html?clickTrackInfo=undefined&search=1&source=search&spm=a2o42.searchlist.list.3",
                "goodsCategory": "Digital  Goods/Digital  Vouchers/Food  and Beverages",
                "goodsUnitAmount": {
                    "currency": "EUR",
                    "value": "30000"
                },
                "goodsQuantity": "10"
            }
        ],
        "shipping": {
            "shippingName": {
                "firstName": "Dehua",
                "lastName": "Liu",
                "fullName": "Dehua Skr Liu",
                "middleName": "Skr"
            },
            "shippingAddress": {
                "zipCode": "310000",
                "address2": "Xihu",
                "city": "Hangzhou",
                "address1": "Wuchang road",
                "state": "Zhejiang",
                "region": "CN"
            },
            "shippingCarrier": "FedEx",
            "shippingPhoneNo": "12345678912",
            "shipToEmail": "test@gmail.com"
        },
        "buyer": {
            "referenceBuyerId": "test12345678",
            "buyerPhoneNo": "12345678912",
            "buyerEmail": "alipay@alipay.com",
            "buyerName": {
                "firstName": "Dehua",
                "lastName": "Liu",
                "fullName": "Dehua Skr Liu",
                "middleName": "Skr"
            }
        }
    },
    "paymentAmount": {
        "currency": "EUR",
        "value": "30000"
    },
    "paymentMethod": {
        "paymentMethodType": "CARD",
        "paymentMethodMetaData": {
            "isCardOnFile": true,
            "recurringType": "SCHEDULED",
            "networkTransactionId": "referenceNetworkTransactionId12345",
            "enableAuthenticationUpgrade": false,
            "is3DSAuthentication": false,
            "cvv": "850",
            "cardholderName": {
                "firstName": "Tom",
                "lastName": "Jay"
            },
            "expiryMonth": "12",
            "billingAddress": {
                "zipCode": "310000",
                "address2": "Xihu",
                "city": "Hangzhou",
                "address1": "Wuchang road",
                "state": "Zhejiang",
                "region": "CN"
            },
            "expiryYear": "29",
            "cardNo": "4117347806156383"
        }
    },
    "settlementStrategy": {
        "settlementCurrency": "EUR"
    },
    "paymentNotifyUrl": "https://www.alipay.com/notify",
    "paymentRedirectUrl": "https://www.alipay.com",
    "paymentRequestId": "PAY_20221114141714891",
    "productCode": "CASHIER_PAYMENT",
    "paymentFactor": {
        "isAuthorization": true
    }
}

指定卡品牌

商户端采集卡的明文信息,并通过 API 形式集成。若用户选择双标卡进行授权支付时,您可以通过 selectedCardBrands 参数指定该笔交易使用的卡品牌所属区域。

注意

  • 如果不设置 selectedCardBrands,Antom 会替您决策其中一个卡品牌进行授权支付。
  • 如果是受理欧洲双标卡的商户,需要满足让用户选择交易处理卡组的权利。详情请参考 双标卡合规要求

处理双标卡支付的整体流程如下图所示:

image.png

图2. 双标卡支付流程

请求样例如下

copy
{
    "order": {
        "orderAmount": {
            "currency": "EUR",
            "value": "30000"
        },
        "orderDescription": "《Bad Romance》-Lady Gaga",
        "referenceOrderId": "ORDER_20231208111545328",
        "goods": [
            {
                "goodsCategory": "Digital Goods",
                "goodsName": "《Bad Romance》",
                "goodsQuantity": "1",
                "goodsUnitAmount": {
                    "currency": "HKD",
                    "value": "30000"
                },
                "goodsUrl": "https://www.youtube.com/watch?v=QdaG6pDOz5A",
                "referenceGoodsId": "GOODS_20231208111545328"
            }
        ],
        "shipping": {
            "shippingName": {
                "firstName": "lady",
                "fullName": "lady gaga",
                "lastName": "gaga"
            },
            "shippingPhoneNo": "123456789"
        },
        "buyer": {
            "buyerEmail": "gaga@gaga.com",
            "buyerName": {
                "firstName": "lady",
                "fullName": "lady gaga",
                "lastName": "gaga"
            },
            "buyerPhoneNo": "123456789",
            "referenceBuyerId": "88888888"
        }
    },
    "env": {
        "terminalType": "WEB",
        "clientIp": "112.80.248.78",
        "deviceId": "eYOIkvFpZzztgO0Yu6USdprBQZCWxDhiUAHCiK8K/cH9mT6wMaMO****",
        "deviceLanguage": "zh_CN"
    },
    "paymentAmount": {
        "currency": "EUR",
        "value": "30000"
    },
    "paymentMethod": {
        "paymentMethodType": "CARD",
        "paymentMethodMetaData": {
            "cardholderName": {
                "firstName": "Lady",
                "lastName": "Gaga"
            },
            "billingAddress": {
                "zipCode": "310000",
                "address2": "Xihu",
                "city": "Hangzhou",
                "address1": "Wuchang road",
                "state": "Zhejiang",
                "region": "CN"
            },
            "cvv": "850",
            "expiryMonth": "12",
            "expiryYear": "29",
            "cardNo": "4390807888888888",
            "selectedCardBrand": "VISA"
        }
    },
    "settlementStrategy": {
        "settlementCurrency": "SGD"
    },
    "paymentNotifyUrl": "https://kademo.intlalipay.cn/payments/notifySuccess",
    "paymentRedirectUrl": "https://kademo.intlalipay.cn/melitigo/Test_114.html",
    "paymentRequestId": "PAY_2023154445445328",
    "productCode": "CASHIER_PAYMENT",
    "paymentFactor": {
        "isAuthorization": true
    }
}

MPI 功能

如果您在授权交易发起前优先让买家完成第三方 3D 核身校验,此时需要您在调用 支付 接口发起授权支付时,通过 mpiData 字段传入 3D 核身结果并指定指定交易为非 3D 认证:

字段

说明

mpiData.threeDSVersion

传入第三方核身机构返回的 3D 协议版本号。

mpiData.caav

传入第三方核身机构返回的 caav。

mpiData.dsTransactionId

传入第三方核身机构返回的交易唯一标识符。

mpiData.eci

传入第三方核身机构返回的 ECI。

is3DSAuthentication

传入 false,用户已完成核身,指定为非3d渠道。

enableAuthenticationUpgrade

传入 false,用户已完成核身,无需再升级为3d渠道。

表 3. MPI 信息

注意:韩国卡组发行的卡在韩国卡组交易网络下进行交易时,不支持此功能。

您调用 支付 接口传入 mpiData 等关键信息的请求样例如下:

copy
{
    "env": {
        "browserInfo": {
            "acceptHeader": "*/*",
            "javaEnabled": true,
            "javaScriptEnabled": true,
            "language": "zh_CN",
            "userAgent": "Chrome/100"
        },
        "terminalType": "APP",
        "clientIp": "112.80.248.78",
        "deviceId": "e******************************************1",
        "osType": "IOS",
        "deviceLanguage": "zh_CN",
        "colorDepth": 48,
        "screenHeight": 768,
        "screenWidth": 1024,
        "timeZoneOffset": 1
    },
    "order": {
        "orderAmount": {
            "currency": "EUR",
            "value": "30000"
        },
        "orderDescription": "Cappuccino #grande (Mika's coffee shop)",
        "referenceOrderId": "O*******************1",
        "goods": [
            {
                "referenceGoodsId": "383382011_SGAMZ-90452****",
                "goodsName": "[3 Boxes] Starbucks Cappuccino Milk Coffee Pods / Coffee Capsules by Nescafe Dolce Gusto",
                "goodsUrl": "https://www.lazada.sg/products/3-boxes-starbucks-cappuccino-milk-coffee-pods-coffee-capsules-by-nescafe-dolce-gusto-i383382011-s904520356.html?clickTrackInfo=undefined&search=1&source=search&spm=a2o42.searchlist.list.3",
                "goodsCategory": "Digital  Goods/Digital  Vouchers/Food  and Beverages",
                "goodsUnitAmount": {
                    "currency": "EUR",
                    "value": "30000"
                },
                "goodsQuantity": "10"
            }
        ],
        "shipping": {
            "shippingName": {
                "firstName": "Dehua",
                "lastName": "Liu",
                "fullName": "Dehua Skr Liu",
                "middleName": "Skr"
            },
            "shippingAddress": {
                "zipCode": "310000",
                "address2": "Xihu",
                "city": "Hangzhou",
                "address1": "Wuchang road",
                "state": "Zhejiang",
                "region": "CN"
            },
            "shippingCarrier": "FedEx",
            "shippingPhoneNo": "1234567****",
            "shipToEmail": "test***@gmail.com"
        },
        "buyer": {
            "referenceBuyerId": "t**********4",
            "buyerPhoneNo": "********567",
            "buyerEmail": "exam***@alipay.com",
            "buyerName": {
                "firstName": "D****",
                "lastName": "L****",
                "fullName": "Dehua Skr****",
                "middleName": "S****"
            }
        }
    },
    "paymentAmount": {
        "currency": "EUR",
        "value": "30000"
    },
    "paymentMethod": {
        "paymentMethodType": "CARD",
        "paymentMethodMetaData": {
            "isCardOnFile": false,
            "enableAuthenticationUpgrade": false,
            "is3DSAuthentication": false,
            "mpiData": {
                "eci": "02",
                "threeDSVersion": "2.2.0",
                "caav": "cavvSample",
                "dsTransactionId": "sample_dsTranascti****"
            },
            "cvv": "850",
            "cardholderName": {
                "firstName": "Tom",
                "lastName": "Jay"
            },
            "expiryMonth": "12",
            "billingAddress": {
                "zipCode": "310000",
                "address2": "Xihu",
                "city": "Hangzhou",
                "address1": "Wuchang road",
                "state": "Zhejiang",
                "region": "CN"
            },
            "expiryYear": "29",
            "cardNo": "****0615"
        }
    },
    "settlementStrategy": {
        "settlementCurrency": "EUR"
    },
    "paymentNotifyUrl": "https://www.alipay.com/notify",
    "paymentRedirectUrl": "https://www.alipay.com",
    "paymentRequestId": "P*******************1",
    "productCode": "CASHIER_PAYMENT",
    "paymentFactor": {
        "isAuthorization": true
    }
}

您调用 支付会话 接口传入 mpiData 等关键信息的请求样例如下:

copy
{
    "env": {
        "clientIp": "112.80.248.78"
    },
    "order": {
        "orderAmount": {
            "currency": "EUR",
            "value": "30000"
        },
        "orderDescription": "Cappuccino #grande (Mika's coffee shop)",
        "referenceOrderId": "O********************1",
        "goods": [
            {
                "referenceGoodsId": "3********************2",
                "goodsName": "[3 Boxes] Starbucks Cappuccino Milk Coffee Pods / Coffee Capsules by Nescafe Dolce Gusto",
                "goodsUrl": "https://www.lazada.sg/products/3-boxes-starbucks-cappuccino-milk-coffee-pods-coffee-capsules-by-nescafe-dolce-gusto-i383382011-s904520356.html?clickTrackInfo=undefined&search=1&source=search&spm=a2o42.searchlist.list.3",
                "goodsCategory": "Digital  Goods/Digital  Vouchers/Food  and Beverages",
                "goodsUnitAmount": {
                    "currency": "EUR",
                    "value": "30000"
                },
                "goodsQuantity": "10"
            }
        ],
        "shipping": {
            "shippingName": {
                "firstName": "Dehua",
                "lastName": "Liu",
                "fullName": "Dehua Skr Liu",
                "middleName": "Skr"
            },
            "shippingAddress": {
                "zipCode": "310000",
                "address2": "Xihu",
                "city": "Hangzhou",
                "address1": "Wuchang road",
                "state": "Zhejiang",
                "region": "CN"
            },
            "shippingCarrier": "FedEx",
            "shippingPhoneNo": "1234567****",
            "shipToEmail": "test@gmail.com"
        },
        "buyer": {
            "referenceBuyerId": "test1234****",
            "buyerPhoneNo": "1234567****",
            "buyerEmail": "example@alipay.com",
            "buyerName": {
                "firstName": "D****",
                "lastName": "L****",
                "fullName": "Dehua Skr****",
                "middleName": "S****"
            }
        }
    },
    "paymentAmount": {
        "currency": "EUR",
        "value": "30000"
    },
    "paymentMethod": {
        "paymentMethodType": "CARD",
        "paymentMethodMetaData": {
            "isCardOnFile": false,
            "enableAuthenticationUpgrade": false,
            "is3DSAuthentication": false,
            "mpiData": {
                "eci": "02",
                "threeDSVersion": "2.2.0",
                "caav": "cavvSample",
                "dsTransactionId": "sample_dsTranascti****"
            },
            "cvv": "850",
            "cardholderName": {
                "firstName": "Tom",
                "lastName": "Jay"
            },
            "expiryMonth": "12",
            "billingAddress": {
                "zipCode": "310000",
                "address2": "Xihu",
                "city": "Hangzhou",
                "address1": "Wuchang road",
                "state": "Zhejiang",
                "region": "CN"
            },
            "expiryYear": "29",
            "cardNo": "****0615"
        }
    },

分期付款

您可以在买家支付时为买家提供分期付款能力,让买家可以选择分期的支付方式。下图展示了分期付款支付的页面:image.png

图 3. 分期付款体验图

如上分期付款体验图中,买家选择完卡分期支付方式后,会在分期计划中展示分期期数和每期金额等相关信息,买家选择首期后去支付。

在买家完成首期支付后,Antom 就会将该笔订单的全部金额按合同中约定的结算周期结算给您。

注意】由于您无需为买家提供分期付款垫资,因此不建议您向买家收取分期手续费。

获取卡品牌分期能力

您可以通过调用 查询 接口获取支付方式支持的分期能力,包含支持的卡品牌、可分期数、及可分期的最大最小总金额等信息。

目前支持分期付款的卡品牌如下表所示。

卡类型

分期能力

支持类型

巴西本地卡品牌

2-12

仅信用卡支持

韩国本地卡品牌

2-12

仅信用卡支持

如下示例展示了 查询 接口返回的卡品牌的分期相关信息:

copy
{
  "result": {
    "resultStatus": "S",
    "resultCode": "SUCCESS",
    "resultMessage": "success."
  },
  "paymentOptions": [
    {
      "paymentMethodRegion": [
        "BR"
      ],
      "paymentMethodCategory": "CARD",
      "installment": {
        "plans": [
          {
            "interestRate": "0.00",
            "installmentNum": "2",
            "interval": "MONTH",
            "minInstallmentAmount": {
              "currency": "BRL",
              "value": "500"
            },
            "enabled": true,
            "maxInstallmentAmount": {
              "currency": "BRL",
              "value": "6000000"
            }
          },
          {
            "interestRate": "0.00",
            "installmentNum": "3",
            "interval": "MONTH",
            "minInstallmentAmount": {
              "currency": "BRL",
              "value": "500"
            },
            "enabled": true,
            "maxInstallmentAmount": {
              "currency": "BRL",
              "value": "6000000"
            }
          },
          {
            "installmentNum": "4",
            "interval": "MONTH",
            "minInstallmentAmount": {
              "currency": "BRL",
              "value": "500"
            },
            "enabled": true,
            "maxInstallmentAmount": {
              "currency": "BRL",
              "value": "6000000"
            }
          },
          {
            "installmentNum": "5",
            "interval": "MONTH",
            "minInstallmentAmount": {
              "currency": "BRL",
              "value": "500"
            },
            "enabled": true,
            "maxInstallmentAmount": {
              "currency": "BRL",
              "value": "6000000"
            }
          },
          {
            "installmentNum": "6",
            "interval": "MONTH",
            "minInstallmentAmount": {
              "currency": "BRL",
              "value": "500"
            },
            "enabled": true,
            "maxInstallmentAmount": {
              "currency": "BRL",
              "value": "6000000"
            }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "7",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "500"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "6000000"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "8",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "500"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "6000000"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "9",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "500"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "6000000"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "10",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "500"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "6000000"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "11",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "500"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "6000000"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "12",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "500"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "6000000"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "2",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "4000"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "999999999900"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "3",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "4000"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "999999999900"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "4",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "4000"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "999999999900"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "5",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "4000"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "999999999900"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "6",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "4000"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "999999999900"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "7",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "4000"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "999999999900"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "8",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "4000"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "999999999900"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "9",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "4000"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "999999999900"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "10",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "4000"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "999999999900"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "11",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "4000"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "999999999900"
          }
          },
          {
          "interestRate": "0.00",
          "installmentNum": "12",
          "interval": "MONTH",
          "minInstallmentAmount": {
          "currency": "BRL",
          "value": "4000"
          },
          "enabled": true,
          "maxInstallmentAmount": {
          "currency": "BRL",
          "value": "999999999900"
          }
          }
        ],
          "supportCardBrands": [
          {
          "logo": {
          "logoName": "AMEX",
          "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/8/2/7a0284b0-7577-493b-bc96-6809ec2f7f79.svg"
          },
          "cardBrand": "AMEX"
          },
          {
          "logo": {
          "logoName": "HIPERCARD",
          "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/8/2/42079be8-2bdd-48a5-9da9-eb7e0917f349.svg"
          },
          "cardBrand": "HIPERCARD"
          },
          {
          "logo": {
          "logoName": "MASTERCARD",
          "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/8/2/bc7cb991-c8e2-4379-945f-aadae2bdf932.svg"
          },
          "cardBrand": "MASTERCARD"
          },
          {
          "logo": {
          "logoName": "VISA",
          "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/9/26/dfd471f3-da7d-4ef1-8486-cfa4301045c6.svg"
          },
          "cardBrand": "VISA"
          },
          {
          "logo": {
          "logoName": "ELO",
          "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/8/2/b252dbb2-1da4-41a1-b796-21eea0d20d75.svg"
          },
          "cardBrand": "ELO"
          }
        ]
          },
          "paymentOptionDetail": {
          "funding": [
          "CREDIT"
        ],
          "supportCardBrands": [
          {
          "logo": {
          "logoName": "AMEX",
          "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/8/2/7a0284b0-7577-493b-bc96-6809ec2f7f79.svg"
          },
          "cardBrand": "AMEX"
          },
          {
          "logo": {
          "logoName": "HIPERCARD",
          "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/8/2/42079be8-2bdd-48a5-9da9-eb7e0917f349.svg"
          },
          "cardBrand": "HIPERCARD"
          },
          {
          "logo": {
          "logoName": "MASTERCARD",
          "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/8/2/bc7cb991-c8e2-4379-945f-aadae2bdf932.svg"
          },
          "cardBrand": "MASTERCARD"
          },
          {
          "logo": {
          "logoName": "VISA",
          "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/9/26/dfd471f3-da7d-4ef1-8486-cfa4301045c6.svg"
          },
          "cardBrand": "VISA"
          },
          {
          "logo": {
          "logoName": "ELO",
          "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/8/2/b252dbb2-1da4-41a1-b796-21eea0d20d75.svg"
          },
          "cardBrand": "ELO"
          }
        ]
          },
          "logo": {
          "logoName": "Credit and Debit Card",
          "logoUrl": "https://gw.alipay.com/icon/medium/default/ALIPAY_GENERAL_CARD.svg"
          },
          "paymentMethodType": "CARD",
          "enabled": true
          },
          {
          "paymentMethodRegion": [
          "BR"
        ],
          "paymentMethodCategory": "CHECKOUT",
          "logo": {
          "logoName": "mercado pago",
          "logoUrl": "https://gw.alipay.com/antom/icon/medium/default/MercadoPagoCheckout.svg"
          },
          "paymentMethodType": "MERCADOPAGO_BR",
          "enabled": true
          },
          {
          "disableReason": "CURRENT_CHANNEL_NOT_EXIST",
          "paymentMethodRegion": [
          "CL"
        ],
          "paymentMethodCategory": "CHECKOUT",
          "logo": {
          "logoName": "mercado pago",
          "logoUrl": "https://gw.alipay.com/antom/icon/medium/default/MercadoPagoCheckout.svg"
          },
          "paymentMethodType": "MERCADOPAGO_CL",
          "enabled": false
          },
          {
          "disableReason": "CURRENT_CHANNEL_NOT_EXIST",
          "paymentMethodRegion": [
          "MX"
        ],
          "paymentMethodCategory": "CHECKOUT",
          "logo": {
          "logoName": "mercado pago",
          "logoUrl": "https://gw.alipay.com/antom/icon/medium/default/MercadoPagoCheckout.svg"
          },
          "paymentMethodType": "MERCADOPAGO_MX",
          "enabled": false
          },
          {
          "disableReason": "CURRENT_CHANNEL_NOT_EXIST",
          "paymentMethodRegion": [
          "PE"
        ],
          "paymentMethodCategory": "CHECKOUT",
          "logo": {
          "logoName": "mercado pago",
          "logoUrl": "https://gw.alipay.com/antom/icon/medium/default/MercadoPagoCheckout.svg"
          },
          "paymentMethodType": "MERCADOPAGO_PE",
          "enabled": false
          }
        ]
          }

获取分期营销信息

以下为分期免息规则:

卡类型

分期能力

手续费收取形式

巴西本地卡品牌

2-12 期全免息

用户无额外手续费

韩国本地卡品牌

免息规则每月更新

不免息情况下,用户在支付完成后可以看到本单对应的手续费

您可以通过以下两种方式获取韩国本地卡品牌的分期营销信息:

  • 通过官网查询分期免息信息,建议按月定期查看最新的分期免息营销信息
  • 调用 查询 接口获取支付方式支持的分期免息规则,包括卡品牌 (bankName)、营销活动过期时间 (expireTime)、支持免息的期数 (installmentFreeNums) 等。

如下示例展示了 查询 接口返回的卡品牌的分期相关信息:

copy
{
    "result": {
        "resultStatus": "S",
        "resultCode": "SUCCESS",
        "resultMessage": "success."
    },
    "paymentOptions": [
        {
            "paymentMethodRegion": [
                "KR"
            ],
            "paymentMethodCategory": "",
            "logo": {
                "logoName": "alipayHK",
                "logoUrl": "https://resourcecenter-v2-internet-site-dev-s29001109997.alipay.net/antom/icon/medium/default/pix.svg"
            },
            "paymentMethodType": "alipayHK",
            "enabled": true,
            "promotionInfos": [{
                "promotionType": "DISCOUNT",
                "discount": {
                  "promotionName": "默认语言的营销文案",
                  "promotionTag": "立减",
                  "estimateSavingsAmount": {
                      "currecny": "HKD",
                      "value": "500"
                  },
                  "cardInterestFree": null
                }
              },
              {
                "promotionType": "CARD_INTEREST_FREE",
                "discount": null,
                "cardInterestFree": {
                  "bankName": "HYUNDAI",
                  "expireTime": "2023-04-27T23:33:09-07:00",
                  "installmentFreeNums": [2,3,4],
                  "installmentInterval": "MONTH",
                  "supportCurrency": "KRW",
                  "minPaymentAmount": {
                      "currecny": "KRW",
                      "value": "50000"
                  },
                  "maxPaymentAmount": {
                      "currecny": "KRW",
                      "value": "9999999"
                  }
                }
              }
            ]
        },
        {
            "disableReason": "CURRENT_CHANNEL_NOT_EXIST",
            "paymentMethodRegion": [
                "HK",
                "TH",
                "KR",
                "PH",
                "ID",
                "CN",
                "MY"
            ],
            "logo": {
                "logoName": "Alipay+",
                "logoUrl": "https://cdn.marmot-cloud.com/storage/aplus-checkout-prod/icon/prod/CONNECT_WALLET.png"
            },
            "paymentMethodType": "CONNECT_WALLET",
            "enabled": false
        }
    ]
}

发起分期付款

通过 API 或 SDK 集成方式发起分期付款的关键操作如下。

API 集成方式

如果买家在支付时选择分期付款,您需要在发起支付前收集买家分期付款的相关信息,如分期期数,并在调用 支付 接口时通过 creditPayPlan 字段传入分期信息。发起支付请求时,表示分期信息的关键字段为 creditPayPlan.installmentNum,表示分期期数,取值范围为 212

更多字段详情说明,请参考 支付 接口。

您调用 支付 接口发起分期支付请求样例如下:

copy
{
    "settlementStrategy": {
        "settlementCurrency": "USD"
    },
    "productCode": "CASHIER_PAYMENT",
    "paymentNotifyUrl": "http://gol.alipay.net:8080/amsdemo/record/notify?env=main_online&paymentMethodType=CARD",
    "paymentRequestId": "amsdmpay_zy236564_20231016_100559_577",
    "paymentRedirectUrl": "http://gol.alipay.net:8080/amsdemo/result?paymentRequestId=amsdmpay_zy236564_20231016_100559_577",
    "paymentFactor": {
        "isAuthorization": true,
        "asyncPay": false,
        "captureMode": "MANUAL"
    },
    "paymentMethod": {
        "paymentMethodMetaData": {
            "cvv": "540",
            "cardholderName": {
                "firstName": "Tom",
                "lastName": "Jerry"
            },
            "expiryMonth": "01",
            "useStringType": false,
            "billingAddress": {
                "zipCode": "310000",
                "address2": "Huanglong",
                "city": "Hangzhou",
                "address1": "Gongzhuan road",
                "state": "Zhejiang",
                "region": "CN"
            },
            "expiryYear": "28",
            "cardNo": "4293380420642881"
        },
        "paymentMethodType": "CARD"
    },
    "creditPayPlan": {
        "installmentNum": 2
    },
    "enableInstallmentCollection":true,
    "paymentAmount": {
        "currency": "BRL",
        "value": "600"
    },
    "order": {
        "orderAmount": {
            "currency": "BRL",
            "value": "600"
        },
        "referenceOrderId": "amsdmorder_zy236564_20231016_100559_577",
        "goods": [
            {
                "referenceGoodsId": "amsdm_good_zy236564_20231016_100559_577",
                "goodsUrl": "HangZhou LeiFenTa",
                "goodsCategory": "card/ssr/adc",
                "goodsUnitAmount": {
                    "currency": "USD",
                    "value": "10000"
                },
                "goodsQuantity": "1",
                "goodsName": "Goods No.1",
                "goodsSkuName": "SKU1",
                "goodsBrand": "AMSDM"
            }
        ],
        "env": {
            "clientIp": "1.1.1.1",
            "osType": "IOS",
            "terminalType": "WEB"
        },
        "extendInfo": "{}",
        "orderDescription": "AMSDM_GIFT",
        "buyer": {
            "referenceBuyerId": "zy236564",
            "buyerRegistrationTime": "2022-01-01T09:30:00+08:00",
            "buyerName": {
                "firstName": "Dehua",
                "lastName": "Liu",
                "fullName": "Dehua Skr Liu",
                "middleName": "Skr"
            }
        }
    }
}

注意】如果您未通过 creditPayPlan 传入分期信息,则该笔支付默认为非分期支付。

SDK 集成方式

如果买家在支付时选择分期付款,您可以选择自行收集分期信息,也可以选择指定由 SDK 采集分期信息。

如果您选择自行收集分期信息,需要在发起支付前收集好买家分期付款的相关信息,如分期期数等,并在调用 创建支付会话 接口时通过 creditPayPlan 字段传入分期信息。发起支付请求时,表示分期信息的关键字段为 creditPayPlan.installmentNum,表示分期期数,取值范围为 212

更多字段详情说明,请参考 创建支付会话 接口。

自行采集分期信息模式下,您调用 创建支付会话 接口发起分期支付请求样例如下:

copy
{
  "settlementStrategy": {
    "settlementCurrency": "USD"
  },
  "productCode": "CASHIER_PAYMENT",
  "paymentNotifyUrl": "http://gol.alipay.net:8080/amsdemo/record/notify?env=main_online&paymentMethodType=CARD",
  "paymentRequestId": "amsdmpay20231016_100927_794",
  "agreementInfo": {
    "authState": "amsdemo_authState_zy236564_20231016_100927_794"
  },
  "paymentRedirectUrl": "http://gol.alipay.net:8080/amsdemo/result?paymentRequestId=amsdmpay_zy236564_20231016_100927_794",
  "paymentFactor": {
    "isAuthorization": true,
    "asyncPay": false,
    "captureMode": "MANUAL"
  },
  "paymentMethod": {
    "paymentMethodType": "CARD"
  },
  "creditPayPlan": {
    "installmentNum": 2
  },
  "enableInstallmentCollection":true,
  "paymentAmount": {
    "currency": "BRL",
    "value": "6000"
  },
  "order": {
    "orderAmount": {
      "currency": "BRL",
      "value": "6000"
    },
    "referenceOrderId": "amsdmorder_zy236564_20231016_100927_794",
    "goods": [
      {
        "referenceGoodsId": "amsdm_good_zy236564_20231016_100927_794",
        "goodsUrl": "HangZhou LeiFenTa",
        "goodsCategory": "card/ssr/adc",
        "goodsUnitAmount": {
          "currency": "USD",
          "value": "10000"
        },
        "goodsQuantity": "1",
        "goodsName": "Goods No.1",
        "goodsSkuName": "SKU1",
        "goodsBrand": "AMSDM"
      }
    ],
    "env": {
      "clientIp": "1.1.1.1",
      "osType": "IOS",
      "terminalType": "WEB"
    },
    "extendInfo": "{}",
    "orderDescription": "AMSDM_GIFT",
    "buyer": {
      "referenceBuyerId": "zy236564",
      "buyerRegistrationTime": "2022-01-01T09:30:00+08:00",
      "buyerName": {
        "firstName": "Dehua",
        "lastName": "Liu",
        "fullName": "Dehua Skr Liu",
        "middleName": "Skr"
      }
    }
  }
}

3D 支付中的环境信息前置采集

当商户端需要发起 3D 支付时,为了提升无感 3D 的比例,提升用户支付体验和成功率,可采用前置采集环境信息方案。

无论最终使用何种核身方式,均需要进行设备信息采集(简称 DDC)和浏览器信息采集,而用户需要等待信息采集过程,影响支付体验。通过此方案,在用户选择完卡号后且提交支付前,提前进行设备信息和浏览器信息的采集,在支付过程中就无需用户等待,提升支付体验。

流程

DDC 流程图-中文.png

集成方案

目前本方式仅适用于 API 集成模式,同时为商户采集卡信息或者传入卡 token 的场景。

获取设备信息采集链接服务端

建议在用户选择完卡号后且提交支付前,就可以发起请求获取设备信息采集链接;由于采集设备信息需要时间,可以在用户人工选择支付方式时并行完成采集。

initializeAuthentication 接口请求 samplecode 如下:

copy
{
    "authenticationRequestId": "202401abcdefg_sda_202404287_yf_gogo_23",
    "identityType": "CARD_PAN",
    "paymentRedirectUrl": "http://www.merchantsite.com",
    "authenticationType": "THREEDS",
    "identityValue": {
      "cardBrand":"VISA",
      "cardBin": "412408",
      "cardClass": "D"
    }
}

请求中用到的关键参数如下:

字段

说明

authenticationRequestId

唯一请求号,用于关联initializeAuthentication和pay接口

identityType

支持两种模式:

  • CARD_TOKEN:使用 Antom 返回的 token 发起支付
  • CARD_NT:使用 network token 支付
  • CARD_PAN:采集明文卡号发起支付

identityValue.cardToken

Network token 支付模式下,传入对应的 token

identityValue.cardBin

采集明文卡号 和使用 network token 支付模式下,传入卡 bin 信息

identityValue.cardBrand

采集明文卡号 和使用 network token 支付模式下,传入卡品牌

identityValue.funding

采集明文卡号 和使用 network token 支付模式下,传入卡类型

initializeAuthentication 接口响应 sample code 如下:

copy
{
    "authenticationId": "2024050716031241000190000162360",
    "authenticationRequestId": "202401abcdefg_sda_202404287_yf_gogo_24",
    "redirectActionForm": {
        "method": "POST",
        "parameters": "{\"ddcReferenceId\":\"af39d8b9-ff19-4013-a097-c54c8375efe2\",\"Bin\":\"412408\",\"JWT\":\"eyJraWQiOiJDQVJESU5BTF9KV1RfYWxpcGF5IiwiY3R5IjoiQ0FSRElOQUxfSldUX2FsaXBheSIsImFsZyI6IkhTMjU2In0.eyJPcmdVbml0SWQiOiI1ZDA5NDJmNmJiODc2ODE5NmMzMTYzYTciLCJSZWZlcmVuY2VJZCI6ImFmMzlkOGI5LWZmMTktNDAxMy1hMDk3LWM1NGM4Mzc1ZWZlMiIsIlJldHVyblVybCI6Im9wZW4tdGVzdC1kZS1ncm91cDIwMjQwNDE4MTQxNDEyLmRsLmFsaXBheWRldi5jb20vYXBpL29wZW4vdXJsX2NhbGxiYWNrX2dldC9jYXJkaW5hbC9jYXJkaW5hbDAwNy5odG0_c2lnbkRhdGE9UGJMendDMk9qYnJIRzNwJTJGOSUyRm1qV2ZCSE5WZmVObzRwJTJCR1NvV3JYNXJFZDY2T3RWVUI0VmNuaE1WcVdTQnZmR2NNdDRRV3pNbUFvek90UjgzRTlYNkVTZEpaRVdiQkQlMkZKS1ZjZHYlMkJpQlcxUHVmR0EzQWZtMGQ3M2lGWFZXNjlqT0ZzOTBqTCUyQm5qb0ZXQTRZWEklMkZ3UExwRVN3T2YlMkJscXhjbUNUVXlETFg2U3hJY0x3ZEF0Y2NZeG5oc0FaVmclMkZCMVFTdHl6diUyQk1sVEtXVUpzdmlYR0c4MDBFa3E5Q29YJTJGWjVNSnQlMkJZRG11WHBHZ0l6OUhKUmxrY0RxRGpySXUlMkY5VSUyRmpMa01VWWNoelJWYXNvdDZDY25uWG5FaktjSW1VeWw1ekxNdlE0Y2M1WGlPWElKdG5SdDdmNlZ3MnRacDNJWVVqMkM1Mld0bWh0JTJGejB4Z05abWlnJTNEJTNEJmluU2VyaWFsTm89MjAyNDA1MDcxNjAzMTM0MTAwMDE5MDAwMDE0NDU3MyZvdXRPcmRlck5vPTIwMjQwNTA3MTYwMzEzNDEwMDAxOTAwMDAxNDQ1NzMiLCJleHAiOjE3MTUwODE3MzgsImlhdCI6MTcxNTA4MDgzOCwiaXNzIjoiNWQwOTQ4MDlhZmE4MGQyMjUwMDQyODBkIiwianRpIjoiMjAyNDA1MDcxNjAzMTM0MTAwMDE5MDAwMDE0NDU3MyJ9.upNHVxubLYrAGzRWUhIM19v9kZ6yPyrR_JG4H54BWAU\"}",
        "redirectUrl": "https://centinelapistag.cardinalcommerce.com/V1/Cruise/Collect"
    },
    "result": {
        "resultCode": "SUCCESS",
        "resultMessage": "success.",
        "resultStatus": "S"
    }
}

响应中用到的关键参数如下:

字段

说明

actionForm.redirectUrl

POST 形式的设备信息采集链接

actionForm.parameters.ddcReferenceId

POST 请求需要带的参数:支付方式 ID

actionForm.parameters.JWT

POST 请求需要带的参数:秘钥

actionForm.parameters.BIN

POST 请求需要带的参数:卡bin

进行设备信息采集客户端

商户前端通过 POST 形式发起对上一initializeAuthentication 接口中请求体中的 redirectUrl 的访问。

Sample code 如下:

copy
Request request = new Request();
request.setMethod("POST");
request.setParameters("{\"ddcReferenceId\":\"af39d8b9-ff19-4013-a097-c54c8375efe2\",\"Bin\":\"412408\",\"JWT\":\"eyJraWQiOiJDQVJESU5BTF9KV1RfYWxpcGF5IiwiY3R5IjoiQ0FSRElOQUxfSldUX2FsaXBheSIsImFsZyI6IkhTMjU2In0.eyJPcmdVbml0SWQiOiI1ZDA5NDJmNmJiODc2ODE5NmMzMTYzYTciLCJSZWZlcmVuY2VJZCI6ImFmMzlkOGI5LWZmMTktNDAxMy1hMDk3LWM1NGM4Mzc1ZWZlMiIsIlJldHVyblVybCI6Im9wZW4tdGVzdC1kZS1ncm91cDIwMjQwNDE4MTQxNDEyLmRsLmFsaXBheWRldi5jb20vYXBpL29wZW4vdXJsX2NhbGxiYWNrX2dldC9jYXJkaW5hbC9jYXJkaW5hbDAwNy5odG0_c2lnbkRhdGE9UGJMendDMk9qYnJIRzNwJTJGOSUyRm1qV2ZCSE5WZmVObzRwJTJCR1NvV3JYNXJFZDY2T3RWVUI0VmNuaE1WcVdTQnZmR2NNdDRRV3pNbUFvek90UjgzRTlYNkVTZEpaRVdiQkQlMkZKS1ZjZHYlMkJpQlcxUHVmR0EzQWZtMGQ3M2lGWFZXNjlqT0ZzOTBqTCUyQm5qb0ZXQTRZWEklMkZ3UExwRVN3T2YlMkJscXhjbUNUVXlETFg2U3hJY0x3ZEF0Y2NZeG5oc0FaVmclMkZCMVFTdHl6diUyQk1sVEtXVUpzdmlYR0c4MDBFa3E5Q29YJTJGWjVNSnQlMkJZRG11WHBHZ0l6OUhKUmxrY0RxRGpySXUlMkY5VSUyRmpMa01VWWNoelJWYXNvdDZDY25uWG5FaktjSW1VeWw1ekxNdlE0Y2M1WGlPWElKdG5SdDdmNlZ3MnRacDNJWVVqMkM1Mld0bWh0JTJGejB4Z05abWlnJTNEJTNEJmluU2VyaWFsTm89MjAyNDA1MDcxNjAzMTM0MTAwMDE5MDAwMDE0NDU3MyZvdXRPcmRlck5vPTIwMjQwNTA3MTYwMzEzNDEwMDAxOTAwMDAxNDQ1NzMiLCJleHAiOjE3MTUwODE3MzgsImlhdCI6MTcxNTA4MDgzOCwiaXNzIjoiNWQwOTQ4MDlhZmE4MGQyMjUwMDQyODBkIiwianRpIjoiMjAyNDA1MDcxNjAzMTM0MTAwMDE5MDAwMDE0NDU3MyJ9.upNHVxubLYrAGzRWUhIM19v9kZ6yPyrR_JG4H54BWAU\"}");
request.setRedirectUrl("https://centinelapistag.cardinalcommerce.com/V1/Cruise/Collect");
request.process();

有以下两个建议:

  • 可以在当前页面通过 iframe 生成一个一像素点的页面,用于加载设备信息采集的链接,既能实现设备信息采集,又对用户无感,支付体验较好;
  • 采集过程建议大于2s,可以采集到更多的设备信息。

进行浏览器信息采集客户端

字段

含义

colorDepth

The color depth of the shopper's browser in bits per pixel. This should be obtained by using the browser's screen.colorDepth property. Accepted values: 1, 4, 8, 15, 16, 24, 30, 32 or 48 bit color depth.

screenHeight

The total height of the shopper's device screen in pixels.

screenWidth

The total width of the shopper's device screen in pixels.

timeZoneOffset

Time difference between UTC time and the shopper's browser local time, in minutes.

acceptHeader

The accept header value of the shopper's browser.

javaEnabled

Boolean value indicating if the shopper's browser is able to execute Java.

javaScriptEnabled

Boolean value indicating if the shopper's browser is able to execute JavaScript. A default 'true' value is assumed if the field is not present.

language

The navigator.language value of the shopper's browser (as defined in IETF BCP 47).

userAgent

The user agent value of the shopper's browser.

发起支付服务端

支付 接口中传入 initializeAuthentication.request.authenticationRequestId 用于关联第一步的设备信息采集,同时传入浏览器9项信息。

请求 sample code 如下:

copy
{
    "settlementStrategy": {
        "settlementCurrency": "EUR"
    },
    "productCode": "CASHIER_PAYMENT",
    "paymentNotifyUrl": "http://gol.alipay.net:8080/amsdemo/record/notify?env=main_dev&paymentMethodType=CARD",
    "paymentRequestId": "amsdmpay_yanfei_wzh_20240428_191505_xx_022",
    "paymentRedirectUrl": "http://gol.alipay.net:8080/amsdemo/result?paymentRequestId=amsdmpay_yanfei_wzh_20240111_191505_666",
    "paymentFactor": {
        "isAuthorization": true
    },
    "paymentMethod": {
        "paymentMethodMetaData": {
            "authenticationRequestId":"2024051419401080010018896022321932",
            "identityType": "CARD_PAN",
            "cvv": "682",
            "cardholderName": {
                "firstName": "Tom",
                "lastName": "Jerry"
            },
            "expiryMonth": "11",
            "expiryYear": "28",
            "billingAddress": {
                "zipCode": "310000",
                "address2": "Huanglong",
                "city": "Hangzhou",
                "address1": "Gongzhuan road",
                "state": "Zhejiang",
                "region": "CN"
            },
            "cardNo": "4124085486814126"
        },
        "paymentMethodType": "CARD"
    },
    "paymentAmount": {
        "currency": "EUR",
        "value": "7000"
    },
    "order": {
        "orderAmount": {
            "currency": "EUR",
            "value": "7000"
        },
        "referenceOrderId": "amsdmorder_yanfei_wzh_20240111_191505_666",
        "goods": [
            {
                "referenceGoodsId": "amsdm_good_yanfei_wzh_20240111_191505_666",
                "goodsUrl": "HangZhou LeiFenTa",
                "goodsCategory": "card/ssr/adc",
                "goodsUnitAmount": {
                    "currency": "USD",
                    "value": "10000"
                },
                "goodsQuantity": "1",
                "goodsName": "Goods No.1",
                "goodsSkuName": "SKU1",
                "goodsBrand": "AMSDM"
            }
        ],
        "env": {
            "clientIp": "1.1.1.1",
            "terminalType": "WEB",
            "osType": "IOS",
            "browserInfo": {
                "acceptHeader": "AcceptHeaded111",
                "javaEnabled": true,
                "javaScriptEnabled": false,
                "language": "EN",
                "userAgent": "agentagentagentagentagent"
            },
            "colorDepth":"12",
            "screenHeight":"50",
            "screenWidth":"50",
            "timeZoneOffset":"8"
    },
        "orderDescription": "AMSDM_GIFT",
        "buyer": {
            "referenceBuyerId": "yanfei.wzh",
            "buyerRegistrationTime": "2022-01-01T09:30:00+08:00",
            "buyerName": {
                "firstName": "Dehua",
                "lastName": "Liu",
                "fullName": "Dehua Skr Liu",
                "middleName": "Skr"
            }
        }
    }
}

请求中用到的关键参数:

字段

说明

paymentMethod.paymentMethodMateData.authenticationRequestId

用于关联第一步的设备信息采集

pay.env.browserInfo

用于传入第三步采集的浏览器信息

pay.env.colorDepth

用于传入第三步采集的环境信息

pay.env.screenHeight

用于传入第三步采集的环境信息

pay.env.screenWidth

用于传入第三步采集的环境信息

pay.env.timeZoneOffset

用于传入第三步采集的环境信息

响应 sample code 如下:

copy
{
    "normalUrl": "https://iopensandbox-sea.alipay.com/xmock.json?xmockUrl=/api/Shadow/Channel/CHECKOUT/threeDS.htm/20240514890313000045C6835316965/false",
    "paymentActionForm": "{\"method\":\"POST\",\"paymentActionFormType\":\"RedirectActionForm\",\"redirectUrl\":\"https://iopensandbox-sea.alipay.com/xmock.json?xmockUrl=/api/Shadow/Channel/CHECKOUT/threeDS.htm/20240514890313000045C6835316965/false\"}",
    "paymentAmount": {
        "currency": "EUR",
        "value": "30000"
    },
    "paymentCreateTime": "2024-05-14T01:47:22-07:00",
    "paymentId": "202405141940108001001885C0204760163",
    "paymentRequestId": "PAY_2023154767445445328",
    "paymentResultInfo": {
        "avsResultRaw": "",
        "cardBrand": "VISA",
        "cardNo": "************8888",
        "cvvResultRaw": "",
        "networkTransactionId": "20240514890313000045C6835316965",
        "threeDSResult": {
            "cavv": "",
            "eci": ""
        }
    },
    "redirectActionForm": {
        "method": "POST",
        "redirectUrl": "https://iopensandbox-sea.alipay.com/xmock.json?xmockUrl=/api/Shadow/Channel/CHECKOUT/threeDS.htm/20240514890313000045C6835316965/false"
    },
    "result": {
        "resultCode": "PAYMENT_IN_PROCESS",
        "resultMessage": "payment in process",
        "resultStatus": "U"
    }
}

注意:前置采集设备信息和浏览器信息,只能提升无感 3D 的比例,但是无法保证返回的 3D 链接一定是无感 3D,仍然有需要用户进行核身的可能。

适用范围

  • 适用模式:API 模式接入
  • 适用地区:欧洲、英国、新加坡、香港、巴西、秘鲁、墨西哥、智利