Query Subscription
POST
Request Body Parameters
application/jsonCommon Request Parameters
bizContent
merchantSubscriptionIdString(64)ConditionalMerchant-defined unique subscription plan ID. At least one of merchantSubscriptionId or subscriptionId is required.subscriptionIdString(64)ConditionalPingPong subscription ID. At least one of subscriptionId or merchantSubscriptionId is required.requestIdString(64)RequiredMerchant request ID.
Request Body Example
{
"clientId": "2024061100000000001",
"accId": "20240611000000000010001",
"signType": "SHA256",
"sign": "SIGN_VALUE",
"version": "1.0",
"bizContent": {
"merchantSubscriptionId": "SUB_M_202606110001",
"subscriptionId": "PP_SUB_001",
"requestId": "REQ_SUB_QUERY_001"
}
}Responses Body Parameters
application/jsonCommon Response Parameters
bizContent
flatPriceObjectRequiredCurrent recurring amount and currency for each formal billing cycle. Note: a change scheduled via NEXT_CYCLE is not reflected in this field until it takes effect; the current price is shown before then.amountString(12)RequiredActual recurring amount for each formal billing cycle of the subscription plan.currencyString(3)RequiredBilling currency for formal subscription cycles, as a 3-letter ISO 4217 currency code.
discountObjectOptionalCurrent effective subscription discount configuration. Not returned when no discount is configured.typeString(32)RequiredDiscount type. Valid values:fixedAmount: fixed-amount discount.percentage: percentage discount.
amountOffString(12)ConditionalFixed discount amount. Provide only when type isfixedAmount; mutually exclusive with percentOff.percentOffString(12)ConditionalPercentage discount value. Provide only when type ispercentage; mutually exclusive with amountOff.durationCountString(12)RequiredNumber of formal billing cycles for which the discount applies, excluding the trial period.
periodObjectRequiredSubscription billing cycle.countIntegerRequiredNumber of units in one formal billing cycle. Must be at least1. For example, unit =MONTHand count =1means monthly billing. This is not the total number of billing cycles.unitStringRequiredSubscription period unit type. Valid values include:YEAR: the subscription cycle is measured in years.MONTH: the subscription cycle is measured in months.WEEK: the subscription cycle is measured in weeks.DAY: the subscription cycle is measured in days.
trialObjectOptionalTrial settings. An empty object{}is returned when no trial is configured.startAtString(10)OptionalTrial start time as a 10-digit second-level timestamp string.endAtString(10)ConditionalTrial end time as a 10-digit second-level timestamp string.periodDaysIntegerConditionalTrial duration in days.
autoRecoveryObjectOptionalAutomatic retry settings.enabledBooleanOptionalWhether automatic retry is enabled. Automatic retry is enabled by default.true: retry enabledfalse: retry disabled
goodsObjectRequiredGoods information for the subscription plan.nameString(128)RequiredProduct name.descriptionString(255)OptionalProduct description.skuString(255)OptionalProduct number, product SKU.unitPriceString(12)RequiredUnit price of the product. Note: the sum ofunitPrice × numbermust equalflatPrice.amount, otherwise301012is returned.unitTaxAmountString(12)ConditionalTax per item, mandatory when the total order amount includes tax.taxRateStringOptionalTax rate.totalDiscountAmountStringConditionalTotal discount amount per item, mandatory when the total order amount involves discounts.numberString(12)RequiredQuantity of the product purchased.imgUrlString(255)RequiredMain image link of the product.virtualProductString(1)OptionalWhether it is a virtual product, virtual goods (Y/N).itemTypeString(1)OptionalProduct type, enumerated values:1/2/3, corresponding meanings are as follows:1DIGITAL: Digital products2PHYSICAL: Physical products3SERVICE: Services
paymentRecordsArrayOptionalSimplified payment record list. Covers recurring cycle charges only; top-up charges or refunds caused by subscription updates are not included here — query them via the Invoice Details API with the invoiceId.periodIntegerRequiredSubscription period number.merchantTransactionIdString(64)RequiredMerchant transaction ID for that period.
refundRecordsArrayOptionalRefund record list.merchantRefundIdString(64)RequiredMerchant refund ID.originalMerchantTransactionIdString(64)RequiredOriginal merchant transaction ID associated with the refund.
merchantSubscriptionIdString(64)RequiredMerchant-defined unique subscription plan ID.subscriptionIdString(64)RequiredPingPong subscription ID.requestIdString(64)RequiredMerchant request ID.descriptionString(255)OptionalSubscription description.statusString(32)RequiredSubscription plan status. Valid values include:PENDING: the subscription has been created but is not yet active.IN_TRIAL: the subscription is in the trial period and service is available, but the first formal charge has not completed yet.ACTIVE: the subscription is currently active and the user is entitled to the service.PAST_DUE: the subscription reached its charge time but the current charge failed, entering the dunning or retry stage.CANCELLED: the subscription has ended and will not renew automatically.
cancelAtPeriodEndBooleanOptionalWhether the subscription is scheduled to cancel at period end.truemeans it will be canceled at the end of the current billing cycle.cancelReasonString(64)OptionalReturned when the subscription status isCANCELLED, indicating why the subscription ended.user_requested: canceled by the usermerchant_requested: canceled by the merchantpayment_retry_exhausted: retry attempts exhaustedplan_ended: plan naturally ended
currentPeriodIntegerRequiredCurrent subscription period, such as0,1,2,3..., where0represents the trial period.startAtString(13)OptionalSubscription start time as a 13-digit millisecond timestamp string.endAtString(13)OptionalSubscription end time as a 13-digit millisecond timestamp string.notifyUrlString(255)RequiredSubscription notification URL.totalPeriodCountIntegerOptionalTotal number of formal billing cycles in the subscription plan. Must be at least1and excludes the trial period. If omitted, the number of formal billing cycles is unlimited.resultCodeStringRequiredBusiness result code.resultMessageStringRequiredBusiness result message.
Request Body Example
{
"clientId": "2025050971820281024",
"accId": "2025050971820281024001",
"signType": "MD5",
"sign": "SIGN_VALUE",
"version": "1.0",
"bizContent": {
"flatPrice": {
"amount": "9.99",
"currency": "USD"
},
"discount": {
"type": "fixedAmount",
"amountOff": "1.00",
"durationCount": "3"
},
"merchantSubscriptionId": "SUB_MER_001",
"subscriptionId": "SUB-1234567890abcdef",
"requestId": "REQ_SUB_QUERY_001",
"description": "monthly membership plan",
"status": "ACTIVE",
"cancelReason": "",
"currentPeriod": 1,
"cancelAtPeriodEnd": false,
"startAt": "1792152473588",
"endAt": "1823688473588",
"notifyUrl": "https://merchant.example.com/notify/subscription",
"period": {
"count": 1,
"unit": "MONTH"
},
"totalPeriodCount": 12,
"trial": {
"startAt": "1785152760",
"endAt": "1785757560",
"periodDays": 7
},
"autoRecovery": {
"enabled": true
},
"goods": {
"name": "Membership",
"description": "Monthly membership",
"sku": "SKU_SUB_001",
"unitPrice": "9.99",
"number": "1",
"imgUrl": "https://merchant.example.com/goods/sub.png",
"virtualProduct": "Y",
"itemType": "1"
},
"paymentRecords": [
{
"period": 1,
"merchantTransactionId": "SUB-1234567890abcdef_P1"
}
],
"refundRecords": [
{
"merchantRefundId": "SREF-1234567890",
"originalMerchantTransactionId": "SUB-1234567890abcdef_P1"
}
],
"resultCode": "000000",
"resultMessage": "SUCCESS"
},
"code": "000000",
"description": "SUCCESS"
}