商户接入指南 商户接入指南
  • V2 (opens new window)
  • V3 (opens new window)
  • V4 (opens new window)
  • V4-English (opens new window)
  • V2 (opens new window)
  • V3 (opens new window)
  • V4 (opens new window)
  • V4-English (opens new window)
  • 接入指南

    • 起步
    • 名词约定
    • 对接流程(必读)
    • 沙箱环境测试资源
    • 对接验收
    • 签名规约
  • 接入方案

    • 收银台模式

      • 内嵌JS-SDK
      • 跳转接入
    • 端到端模式

      • 快速开始
      • 商户收银台规范
    • 交易状态

      • 交易状态
      • 风险订单REVIEW
      • 异步通知
    • 交易场景

      • 交易模式-DEBIT和AUTH
      • Tokenization
      • NetworkToken
      • 本地支付
      • 3D集成指南
      • recurring集成指南
      • 退款集成指南
      • dispute API集成指南
      • 一键支付集成指南
    • 开源建站工具插件支持

      • Magento235
      • Woocommerce
      • OpenCart
      • Prestashop
      • ZenCart
  • APIs

    • 交易下单

      • 获取跳转收银台
      • 收银台SDK参数
      • 端到端直连-仅信用卡
      • 统一下单-本地支付&信用卡
      • 退款
      • 预授权确认
      • 预授权取消
      • 修改交易信息
    • 交易查询

    • 快捷支付

    • 一键支付

    • 拒付管理

    • 风控管理

    • 物流信息

    • 交易账单

    • 币种汇率

    • 商户信息

    • KYB方案

  • 工具

  • 附录

  • v3

ApplePay 订阅支付集成

Apple Pay 支持订阅支付模式,允许商户为用户设置定期自动扣费服务。

# 集成流程

# Step1 首笔支付

首次订阅支付需要通过跳转收银台模式完成,用于建立订阅关系并获取支付令牌。使用统一下单接口。

关键参数说明:

参数名称 参数说明 是否必填
merchantUserId 商户用户唯一标识 必填
createToken 是否创建支付令牌,固定值"Y" 必填
bizType 业务类型,固定值"CodeGrant" 必填
recurringInfo 订阅信息对象 必填

recurringInfo 订阅信息参数:

参数名称 参数说明 示例值
recurringPaymentStartDate 订阅开始时间 "2025-06-01 00:00:00"
recurringPaymentIntervalUnit 扣费周期单位 "month"
recurringPaymentIntervalCount 扣费周期数量 "6"
recurringPaymentEndDate 订阅结束时间 "2025-12-01 00:00:00"

完整请求示例:

{
  "acquirerType": "CHECKOUT",
  "accId": "2023042011040310224447",
  "amount": "200",
  "currency": "USD",
  "requestId": "PMR-1751341035131",
  "merchantTransactionId": "PMT-1751341035131",
  "paymentType": "DEBIT",
  "payType":"APM",
  "bizType": "CodeGrant",
  "merchantUserId":"126048960513465",
  "createToken":"Y",
  "notificationUrl": "https://test-acquirerpay.pingpongx.com/qa/notify",
  "shopperResultUrl": "https://test-acquirerpay.pingpongx.com/qa/result.html",
  "signType": "MD5",
  "sign": "46A676FDEA4F3DD0BC9E34C5CFACED69",
  "paymentBrand":"ApplePay",
  "customer": {
    "firstName": "May",
    "lastName": "Rally",
    "email": "test@pingpongx.com"
  },
  "goods": [
    {
      "name": "商品名称mepsking1",
      "description": "商品描述",
      "sku": "产品SKU111",
      "averageUnitPrice": "1",
      "number": "10",
      "imgUrl": "https://xiu.mepsking.top/material/1/16606169805015585.png"
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

完整响应示例:

{
    "accId": "2023042011040310224447",
    "clientId": "2023042011040310224",
    "code": "001000",
    "description": "Successful request",
    "innerJsUrl": "https://pay-cdn.pingpongx.com/production-fra/static/pp-checkout/sandbox/pp-checkout.js?token=EU:_4yVcxYyb2iT7VF_gTIZJUrWIrUCkm_tBzCbNBSvTmG6tqrh2JSgesOF_vRyliLU",
    "merchantTransactionId": "PMT-1751340150033",
    "paymentUrl": "https://sandbox-safepay.pingpongx.com?token=EU:_4yVcxYyb2iT7VF_gTIZJUrWIrUCkm_tBzCbNBSvTmG6tqrh2JSgesOF_vRyliLU",
    "sign": "E1B6189D341BC24EBDC571321607732B",
    "signType": "MD5",
    "token": "EU:_4yVcxYyb2iT7VF_gTIZJUrWIrUCkm_tBzCbNBSvTmG6tqrh2JSgesOF_vRyliLU"
}
1
2
3
4
5
6
7
8
9
10
11
12

订阅支付特殊参数:

参数名称 参数值
bizType "CodeGrant"
createToken "Y"
merchantUserId "126048960513465"

recurringInfo 参数示例:

"recurringInfo": {
    "recurringPaymentStartDate": "2025-06-01 00:00:00",
    "recurringPaymentIntervalUnit": "month",
    "recurringPaymentIntervalCount": "6",
    "recurringPaymentEndDate": "2025-12-01 00:00:00"
}
1
2
3
4
5
6

# Step2 获取支付令牌

首笔支付成功后,系统会通过交易异步通知返回支付令牌(token)。

重要提醒

  • 只有首次交易状态为 SUCCESS 时才能获取有效的支付令牌
  • 请妥善保存令牌,用于后续自动扣费
  • 令牌与 merchantUserId 绑定,请确保一致性

# Step3 后续自动扣费

使用获取的令牌进行后续自动扣费,调用统一下单接口。

关键参数:

参数名称 参数说明 是否必填
bizType 业务类型,固定值"CodeGrant" 必填
merchantUserId 与首笔支付保持一致 必填
token 从首笔支付异步通知中获取 必填

二次扣款请求示例:

{
    "acquirerType": "PAY",
    "accId": "2023042011040310224447",
    "amount": "200",
    "currency": "USD",
    "requestId": "PMR-1751341675362",
    "merchantTransactionId": "PMT-1751341675362",
    "paymentType": "DEBIT",
    "payType":"APM",
    "bizType": "CodeGrant",
    "merchantUserId":"23214214123",
    "notificationUrl": "https://test-acquirerpay.pingpongx.com/qa/notify",
    "shopperResultUrl": "https://test-acquirerpay.pingpongx.com/qa/result.html",
    "signType": "MD5",
    "sign": "D7E1352C2EAB141D93BA7C63EE31BE78",
    "paymentBrand":"ApplePay",
    "tokenDetail": {
        "token": "93cf697a33321d201b87b532e044a321"
    },
    "customer": {
        "firstName": "May",
        "lastName": "Rally",
        "email": "test@pingpongx.com"
    },
    "goods": [
        {
            "name": "商品名称mepsking1",
            "description": "商品描述",
            "sku": "产品SKU111",
            "averageUnitPrice": "1",
            "number": "10",
            "imgUrl": "https://xiu.mepsking.top/material/1/16606169805015585.png"
        }
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

二次扣款特殊参数:

参数名称 参数值
bizType "CodeGrant"
merchantUserId "126048960513465"
token "81cf697a30731d407b87b680e044a351"

# 注意事项

  1. 令牌管理:支付令牌有效期为20年,请关注令牌状态并及时处理失效情况
  2. 订阅周期:合理设置订阅周期,避免过于频繁的扣费
  3. 用户体验:建议在订阅前明确告知用户扣费规则和取消方式
  4. 异常处理:做好扣费失败的处理逻辑,如重试机制、用户通知等
上次更新: 2025/07/01, 15:03:26
杭州乒乓智能技术有限公司 | Copyright © 2015-2026 checkout.pingpongx.com.All Rights Reserved.
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式