--- url: >- https://acquirer-api-docs-v4-en.pingpongx.com/en/notes/subscription/api/paymentsQuery/index.md description: >- The Query Subscription Payments API returns the payment order details of each billing period under a subscription plan, addressable by subscription ID or a specific merchantTransactionId. --- # Query Subscription Payments ```apidef endpoint: POST /v4/subscriptions/payments/query name: Query Subscription Payments summary: Query subscription payment records tags: Subscription, Query ``` The Query Subscription Payments API returns the payment order details of each billing period under a subscription plan, addressable by subscription ID or a specific merchantTransactionId. ## Request Parameters | Parameter | Type | Required | Description | |--------|------|------|------| | accId | string | M | Unique identifier for the store, which will appear in the response message after creation; inputting it means modifying the data | | clientId | string | M | PingPong Merchant ID | | signType | string | M | Supports MD5 , SHA256; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document | | sign | string | M | Signature; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document. All parameters participate in the signature | | version | string | M | Version number, currently fixed at 1.0, may be adjusted with changes to the interface in the future | | bizContent | string | M | Collection of request parameters, with no limit on maximum length. Except for common request parameters, all other request parameters must be passed within this parameter, format: JSON string | | └─ merchantSubscriptionId | string | C | Merchant-defined unique subscription plan ID. At least one of merchantSubscriptionId , subscriptionId , or merchantTransactionId is required. | | └─ subscriptionId | string | C | PingPong subscription ID. At least one query condition is required. | | └─ merchantTransactionId | string | C | Merchant transaction ID for a subscription payment. At least one query condition is required. | | └─ requestId | string | M | Merchant request ID. | ### Request Example ```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\"}" } ``` ## Response Parameters | Parameter | Type | Description | |--------|------|------| | accId | string | Unique store identifier, which will appear in the response message after being added; inputting it means modifying the data | | clientId | string | PingPong merchant number | | signType | string | Supports MD5 , SHA256; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document | | sign | string | Signature; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document. All parameters participate in the signature | | code | string | Result status code, see the appendix Status Code Table: /en/notes/appendix/successCodeList/ | | description | string | Result description | | bizContent | string | Business response parameters | | └─ merchantSubscriptionId | string | Merchant-defined unique subscription plan ID. | | └─ subscriptionId | string | PingPong subscription ID. | | └─ requestId | string | Merchant request ID. | | └─ paymentRecords | array | Subscription payment record list. | | └─ └─ period | integer | Subscription period number. | | └─ └─ merchantTransactionId | string | Merchant transaction ID. | | └─ └─ transactionId | string | PingPong transaction ID. | | └─ └─ requestId | string | Original payment request ID. | | └─ └─ amount | string | Payment amount. | | └─ └─ originalAmount | string | Original amount due before applying a subscription discount. Returned in subscription discount scenarios. | | └─ └─ discountAmount | string | Discount amount actually applied in the current subscription discount scenario. | | └─ └─ discountApplied | boolean | Whether a discount was actually applied to the current payment in a subscription discount scenario. | | └─ └─ currency | string | Payment currency. | | └─ └─ status | string | Payment status. | | └─ └─ transactionTime | string | Transaction initiation time. | | └─ └─ transactionEndingTime | string | Transaction final-state time. | | └─ └─ paymentMethod | object | Payment method details. | | └─ └─ └─ type | string | Payment method type. | | └─ └─ └─ cardInfo | object | Masked card details. | | └─ └─ └─ └─ firstName | string | Cardholder first name. | | └─ └─ └─ └─ lastName | string | Cardholder last name. | | └─ └─ └─ └─ firstSixDigits | string | First six digits. | | └─ └─ └─ └─ lastFourDigits | string | Last four digits. | | └─ └─ └─ └─ countryCode | string | Country code. | | └─ └─ └─ └─ brand | string | Card brand. | | └─ resultCode | string | Business result code. | | └─ resultMessage | string | Business result message. | ### Response Example ```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\",\"originalAmount\":\"10.99\",\"discountAmount\":\"1.00\",\"discountApplied\":true,\"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" } ```