Create Subscription Checkout Session
POST
Request Body Parameters
application/jsonCommon Request Parameters
bizContent
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.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. At least one of endAt or periodDays is required. If both are provided, endAt takes precedence.periodDaysIntegerConditionalTrial duration in days, calculated from the trial start time startAt.
autoRecoveryObjectOptionalAutomatic retry settings.enabledBooleanOptionalWhether automatic retry is enabled. Automatic retry is enabled by default.true: retry enabledfalse: retry disabled
flatPriceObjectRequiredRecurring amount and currency for each formal billing cycle. The amount must not be zero.amountString(12)RequiredRecurring billing amount. The current implementation does not allow0.currencyString(3)RequiredRecurring billing currency.
discountObjectOptionalSubscription discount configuration. Applies only to formal billing cycles and not to the trial period.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.
customerObjectOptionalCustomer information.firstNameStringOptionalCustomer first name.lastNameStringOptionalCustomer last name.emailString(128)OptionalCustomer email.phoneString(20)OptionalCustomer phone number.phoneCountryCodeString(5)OptionalPhone country code.identificationTypeString(20)OptionalIdentification type.identificationIdString(20)OptionalIdentification number.birthDateString(10)OptionalBirth date.accountNumberStringOptionalAccount number.domesticCardNumberStringOptionalDomestic card number.domesticCardIssuingDateStringOptionalDomestic card issuing date.domesticCardExpireMonthStringOptionalDomestic card expiry month.domesticCardExpireYearStringOptionalDomestic card expiry year.
goodsObjectRequiredGoods information.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
billingAddressObjectRequiredBilling address.streetString(256)RequiredBilling street.postcodeString(16)RequiredPostal code.cityString(50)RequiredCity.stateString(128)RequiredState or province.countryString(64)RequiredTwo-letter country code.districtStringOptionalDistrict.
browserInfoObjectOptionalBrowser information. Required for card payments.windowSizeStringOptionalWindow size:01-250x40002-390x40003-500x60004-600x40005-Full screen
acceptHeaderStringOptionalHTTP response header information, example value: text/html, application/xhtml+xml, application/xml;q=0.9, image/webp, image/apng, *;q=0.8colorDepthStringOptionalWindow color, obtained from browser screen.colorDepth. Example value:32screenHeightStringOptionalWindow height.screenWidthStringOptionalScreen width (unit: pixels).jetLagStringOptionalTime difference in minutes between UTC and the cardholder's browser local time.userAgentStringOptionalBrowser user agent information.javaEnabledBooleanOptionalWhether the cardholder's device can execute Java.javaScriptEnabledBooleanOptionalIndicates whether the shopper's browser can execute JavaScript. If the field is absent, it is assumed to have the default value oftrue.
deviceObjectRequiredDevice information. accessModel values can be omitted.orderTerminalString(2)Required01- Mobile browser (app)02- PC browser (pc)04- SDK (ios)05- SDK (Android)06- WeChat Mini Program09- QR Code
merchantSubscriptionIdString(64)RequiredMerchant-defined unique subscription plan ID.merchantTransactionIdString(64)RequiredMerchant transaction ID for the first payment. Sandbox verified (2026-10-21): required; absence returns `merchantTransactionId:must not be blank` (102000).requestIdString(64)RequiredUnique merchant request ID.descriptionString(256)RequiredSubscription description.startAtString(10)OptionalSubscription start time as a 10-digit second-level timestamp string.endAtString(10)OptionalSubscription end time as a 10-digit second-level timestamp string.notifyUrlString(512)RequiredSubscription notification URL.
URL recommendation: use a complete URL with a publicly reachable domain name. Standard web ports are recommended (HTTPS defaults to 443 and HTTP defaults to 80). Ensure the URL can reliably receive PingPongCheckout asynchronous notifications.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.redirectUrlString(255)RequiredRedirect URL after subscription or payment handling.payCancelUrlString(255)RequiredRedirect URL when the shopper cancels payment.payResultUrlString(512)RequiredPayment result page URL that the customer is redirected to after the initial payment completes.paymentNotifyUrlString(255)OptionalPayment result notification URL for this session.
URL recommendation: use a complete URL with a publicly reachable domain name. Standard web ports are recommended (HTTPS defaults to 443 and HTTP defaults to 80). Ensure the URL can reliably receive PingPongCheckout asynchronous notifications.remarkString(255)OptionalMerchant extension field.languageString(12)OptionalInteraction language.tradeCountryString(2)RequiredCountry used for the PingPong checkout.shopperIPString(128)RequiredUser's IP address for placing the order, supports IPv4 format.merchantSourceString(64)ConditionalSite-building platform identifier when applicable.merchantRequestBillDescriptorString(22)OptionalMerchant-defined dynamic billing descriptor, up to 22 characters. Only English letters, digits, whitespace, and these ASCII punctuation marks are allowed:, . ( ) - / :. Chinese characters and other special characters are not allowed. Different channels may apply appropriate truncation.customerIdString(64)RequiredPingPong customer ID. Create the customer first via the Create Customer API. Sandbox verified (2026-10-21): if omitted,102000 customerId: must not be blankis returned.paymentMethodsArrayOptionalAllowed payment methods displayed on checkout, used to control which payment methods can be shown to the user for this subscription checkout. Currently supported values:CARDInternational credit cardApplePayGooglePayKlarnaPayPal
Request Body Example
{
"clientId": "2024061100000000001",
"accId": "20240611000000000010001",
"signType": "SHA256",
"sign": "SIGN_VALUE",
"version": "1.0",
"bizContent": {
"merchantSubscriptionId": "SUB_M_202606110002",
"merchantTransactionId": "MT_SUB_202606110002",
"requestId": "REQ_SUB_SESSION_001",
"description": "Monthly membership subscription",
"startAt": "1781116800",
"notifyUrl": "https://merchant.example.com/notify/subscription",
"period": {
"count": 1,
"unit": "MONTH"
},
"totalPeriodCount": 12,
"trial": {
"startAt": "1781116800",
"endAt": "1781721600",
"periodDays": 7
},
"autoRecovery": {
"enabled": true
},
"flatPrice": {
"amount": "9.99",
"currency": "USD"
},
"discount": {
"type": "percentage",
"percentOff": "10",
"durationCount": "3"
},
"redirectUrl": "https://merchant.example.com/subscription/return",
"payCancelUrl": "https://merchant.example.com/subscription/cancel",
"payResultUrl": "https://merchant.example.com/subscription/result",
"paymentNotifyUrl": "https://merchant.example.com/notify/payment",
"remark": "test subscription session",
"language": "en",
"tradeCountry": "US",
"shopperIP": "8.8.8.8",
"merchantSource": "SHOPIFY",
"merchantRequestBillDescriptor": "TEST SUB",
"customerId": "CUS-260507100000000001",
"paymentMethods": [
"CARD"
],
"customer": {
"firstName": "John",
"lastName": "Smith",
"email": "john.smith@example.com",
"phone": "13800138000",
"phoneCountryCode": "86"
},
"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"
},
"billingAddress": {
"street": "1 Market St",
"postcode": "94105",
"city": "San Francisco",
"state": "CA",
"country": "US"
},
"browserInfo": {
"windowSize": "05",
"acceptHeader": "text/html,application/xhtml+xml",
"colorDepth": "32",
"screenHeight": "1080",
"screenWidth": "1920",
"jetLag": "-480",
"userAgent": "Mozilla/5.0",
"javaEnabled": false,
"javaScriptEnabled": true
},
"device": {
"orderTerminal": "02"
}
}
}Responses Body Parameters
application/jsonCommon Response Parameters
bizContent
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.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
flatPriceObjectRequiredRecurring amount and currency for each formal billing cycle.amountString(12)RequiredSubscription payment amount.currencyString(3)RequiredSubscription billing currency.
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.
merchantSubscriptionIdString(64)RequiredMerchant-defined unique subscription plan ID.requestIdString(64)RequiredMerchant request ID.subscriptionIdString(64)RequiredPingPong subscription ID.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.
redirectUrlString(255)OptionalRedirect URL after checkout payment is completed.startAtString(10)OptionalSubscription start time as a 10-digit second-level timestamp string.endAtString(10)OptionalSubscription end time as a 10-digit second-level 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.tokenStringRequiredSubscription checkout session token.innerJsUrlStringRequiredJS SDK URL.paymentUrlStringRequiredHosted payment URL.partnerTransactionIdString(64)OptionalFirst payment transaction ID, corresponding to merchantTransactionId in the request.actionObjectOptionalFollow-up action required from the buyer, containing jsSdkUrl / paymentRedirectUrl etc.; an empty object when no further action is needed.resultCodeString(6)RequiredAcceptance result code; 000000 indicates success.resultMessageString(256)RequiredAcceptance result description.
Request Body Example
{
"clientId": "2025050971820281024",
"accId": "2025050971820281024001",
"signType": "MD5",
"sign": "SIGN_VALUE",
"version": "1.0",
"bizContent": {
"merchantSubscriptionId": "SUB_MER_SESSION_001",
"requestId": "REQ_SUB_SESSION_001",
"subscriptionId": "SUB-abcdef1234567890",
"redirectUrl": "https://merchant.example.com/checkout/result",
"startAt": "1785152760",
"endAt": "1817293560",
"notifyUrl": "https://merchant.example.com/subscription/notify",
"period": {
"count": 1,
"unit": "MONTH"
},
"totalPeriodCount": 12,
"trial": {
"startAt": "1785152760",
"endAt": "1785757560",
"periodDays": 7
},
"autoRecovery": {
"enabled": true
},
"status": "PENDING",
"flatPrice": {
"amount": "9.99",
"currency": "USD"
},
"discount": {
"type": "percentage",
"percentOff": "10",
"durationCount": "3"
},
"token": "EU:session_token_example",
"innerJsUrl": "https://pay-cdn.pingpongx.com/pp-checkout.js?token=EU:session_token_example",
"paymentUrl": "https://dev-safepay.pingpongx.com?token=EU:session_token_example",
"partnerTransactionId": "MT_SUB_202606110002",
"action": {
"jsSdkUrl": "https://pay-cdn.pingpongx.com/pp-checkout.js?token=EU:session_token_example",
"paymentRedirectUrl": "https://dev-safepay.pingpongx.com?token=EU:session_token_example"
},
"resultCode": "000000",
"resultMessage": "success"
},
"code": "000000",
"description": "SUCCESS"
}