--- url: >- https://acquirer-api-docs-v4-en.pingpongx.com/notes/zh/subscription/api/paymentsQuery/index.md description: 查询订阅支付记录接口用于查询某个订阅计划下的支付订单明细,支持按订阅号或具体 merchantTransactionId 定位。 --- # 查询订阅支付记录 ```apidef endpoint: POST /v4/subscriptions/payments/query name: 查询订阅支付记录 summary: 查询订阅支付订单记录 tags: Subscription, Query ``` 查询订阅支付记录接口用于查询某个订阅计划下的支付订单明细,支持按订阅号或具体 merchantTransactionId 定位。 ## 请求参数 | 参数名 | 类型 | 必填 | 说明 | |--------|------|------|------| | accId | string | M | 店铺唯一标识 | | clientId | string | M | PingPong 商户号 | | signType | string | M | 支持 MD5 、 SHA256 ,具体⻅本文签名规约: /notes/zh/onlinePayment/developer/sign/一栏 | | sign | string | M | 签名,具体⻅本文签名规约: /notes/zh/onlinePayment/developer/sign/,所有参数均参与签名 | | version | string | M | 版本号,当前固定为1.0,后续随接口变动可能有调整 | | bizContent | string | M | 请求参数的集合,最大长度不限,除公共请求参数外所有请求参数都必须放在这个参数中传递,格式:JSON字符串。该字段内容为 JSON 字符串,反序列化后的结构见 contentSchema。 | | └─ merchantSubscriptionId | string | C | 商户定义的订阅计划的唯一ID;和 subscriptionId 、 merchantTransactionId 至少上传一个。 | | └─ subscriptionId | string | C | PingPong 订阅单号;和其他查询条件至少上传一个。 | | └─ merchantTransactionId | string | C | 订阅支付单的商户交易单号;和其他查询条件至少上传一个。 | | └─ requestId | string | M | 商户请求唯一编号。 | ### 请求示例 ```json { "clientId": "2024061100000000001", "accId": "20240611000000000010001", "signType": "SHA256", "sign": "SIGN_VALUE", "version": "1.0", "bizContent": "{\"merchantSubscriptionId\":\"SUB_M_202606110001\",\"subscriptionId\":\"PP_SUB_001\",\"merchantTransactionId\":\"SUB_M_202606110001_1\",\"requestId\":\"REQ_SUB_PAYMENT_QUERY_001\"}" } ``` ## 响应参数 | 参数名 | 类型 | 说明 | |--------|------|------| | accId | string | 店铺唯一标识 | | clientId | string | PingPong 商户号 | | signType | string | 支持 MD5 、 SHA256 ,具体⻅本文签名规约: /notes/zh/onlinePayment/developer/sign/一栏 | | sign | string | 签名,具体⻅本文签名规约: /notes/zh/onlinePayment/developer/sign/,所有参数均参与签名 | | code | string | 结果状态码,见附录状态码表: /notes/zh/appendix/successCodeList/ | | description | string | 结果描述 | | bizContent | string | 业务响应参数。该字段内容为 JSON 字符串,反序列化后的结构见 contentSchema。 | | └─ merchantSubscriptionId | string | 商户定义的订阅计划的唯一ID。 | | └─ subscriptionId | string | PingPong 订阅单号。 | | └─ requestId | string | 商户请求唯一编号。 | | └─ paymentRecords | array | 订阅支付记录列表。 | | └─ └─ period | integer | 所属订阅期次。 | | └─ └─ merchantTransactionId | string | 商户交易单号。 | | └─ └─ transactionId | string | PingPong 交易流水号。 | | └─ └─ requestId | string | 原支付请求号。 | | └─ └─ amount | string | 支付金额。 | | └─ └─ currency | string | 支付币种。 | | └─ └─ status | string | 支付状态。 | | └─ └─ transactionTime | string | 交易发起时间。 | | └─ └─ transactionEndingTime | string | 交易终态时间。 | | └─ └─ paymentMethod | object | 支付方式信息。 | | └─ └─ └─ type | string | 支付方式类型。 | | └─ └─ └─ cardInfo | object | 脱敏卡信息。 | | └─ └─ └─ └─ firstName | string | 持卡人名。 | | └─ └─ └─ └─ lastName | string | 持卡人姓。 | | └─ └─ └─ └─ firstSixDigits | string | 卡号前六位。 | | └─ └─ └─ └─ lastFourDigits | string | 卡号后四位。 | | └─ └─ └─ └─ countryCode | string | 国家码。 | | └─ └─ └─ └─ brand | string | 卡品牌。 | | └─ resultCode | string | 业务处理结果码。 | | └─ resultMessage | string | 业务处理结果描述。 | ### 响应示例 ```json { "clientId": "2025050971820281024", "accId": "2025050971820281024001", "signType": "MD5", "sign": "SIGN_VALUE", "version": "1.0", "bizContent": "{\"merchantSubscriptionId\":\"SUB_MER_001\",\"subscriptionId\":\"SUB-1234567890abcdef\",\"requestId\":\"REQ_SUB_PAYMENT_QUERY_001\",\"paymentRecords\":[{\"period\":1,\"merchantTransactionId\":\"SUB-1234567890abcdef_P1\",\"transactionId\":\"PAY-ORDER-1234567890\",\"requestId\":\"SPAY-1234567890\",\"amount\":\"9.99\",\"currency\":\"USD\",\"status\":\"SUCCESS\",\"transactionTime\":\"1785152760\",\"transactionEndingTime\":\"1785152860\",\"paymentMethod\":{\"type\":\"CARD\",\"cardInfo\":{\"firstName\":\"James\",\"lastName\":\"Lebron\",\"firstSixDigits\":\"411111\",\"lastFourDigits\":\"1111\",\"countryCode\":\"US\",\"brand\":\"VISA\"}}}],\"resultCode\":\"000000\",\"resultMessage\":\"SUCCESS\"}", "code": "000000", "description": "SUCCESS" } ```