Create Subscription (API Only)
POST
Request Body Parameters
application/jsonCommon Request Parameters
bizContent
periodObjectRequiredSubscription billing duration.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 period 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 configuration.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)RequiredRecurring billing amount for each cycle.currencyString(3)RequiredRecurring billing currency in ISO 4217 3-letter format.
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.
paymentMethodObjectRequiredPayment method and payment details.typeString(32)RequiredPayment method type. Currently supported values:schemeInternational credit cardApplePayGooglePayKlarnaPayPal
cardInfoObjectConditionalCard payment details. Required when using international cards.numberStringRequiredCard number.expireMonthString(2)RequiredCard expiry month.expireYearString(4)RequiredCard expiry year.holderFirstNameStringRequiredCardholder first name.holderLastNameStringRequiredCardholder last name.cvvStringRequiredCard security code.
customerObjectOptionalCustomer information. Not needed when customerId is provided; the customer profile referenced by customerId prevails.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.requestIdString(64)RequiredUnique merchant request ID.descriptionString(256)RequiredDescription of the subscription plan, for example Youtube monthly menbership.redirectUrlString(255)OptionalRedirect URL that requires merchant handling during the subscription process, typically a 3DS challenge page or a wallet authorization binding page. Sandbox verified (2026-10-21): optional for creation; recommended when the first payment may trigger 3DS or authorization redirects.startAtString(10)OptionalSubscription start time as a 10-digit second-level timestamp string. If omitted, the current time is used by default.endAtString(10)OptionalSubscription end time as a 10-digit second-level timestamp string. A merchant-specified end time remains supported. If neither an end time nor a total cycle count is specified, the subscription renews indefinitely.notifyUrlString(512)RequiredSubscription plan 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.payResultUrlString(512)RequiredPayment result page URL that the customer is redirected to after the initial payment completes. Sandbox verified (2026-10-21): required; absence returns `payResultUrl:must not be blank` (102000).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.paymentNotifyUrlString(255)OptionalPayment result notification URL.
URL recommendation: use a complete URL with a publicly reachable domain name. Standard web ports are recommended (HTTPS defaults to 443, HTTP defaults to 80). Ensure the URL can reliably receive PingPongCheckout asynchronous notifications.remarkString(255)OptionalMerchant extension field returned as-is in the response.languageString(12)OptionalInteraction language.tradeCountryString(2)RequiredTransaction country. Use an ISO 3166-1 alpha-2 two-letter country code.shopperIPString(64)RequiredUser's IP address for placing the order, supports IPv4 format.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. If omitted,102000 customerId: must not be blankis returned.jsGeneratedDataString(256)ConditionalCard payments must integrate the risk control component. Card payments need to pass this value. If acquisition fails, an empty string can be passed without blocking the payment flow. By embedding the risk control component provided by PingPong, obtain the browser-related JSON string and pass it in this parameter. Used by merchants integrated with the risk control plugin. See the 3DS Integration Guide for details.
Request Body Example
{
"clientId": "2024061100000000001",
"accId": "20240611000000000010001",
"signType": "SHA256",
"sign": "SIGN_VALUE",
"version": "1.0",
"bizContent": {
"merchantSubscriptionId": "SUB_M_202606110001",
"requestId": "REQ_SUB_CREATE_001",
"description": "Monthly membership subscription",
"redirectUrl": "https://merchant.example.com/subscription/return",
"payResultUrl": "https://merchant.example.com/subscription/result",
"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": "fixedAmount",
"amountOff": "1.00",
"durationCount": "3"
},
"paymentNotifyUrl": "https://merchant.example.com/notify/payment",
"remark": "test subscription",
"language": "en",
"tradeCountry": "US",
"shopperIP": "8.8.8.8",
"merchantRequestBillDescriptor": "TEST SUB",
"customerId": "CUS-260507100000000001",
"paymentMethod": {
"type": "scheme",
"cardInfo": {
"number": "4111111111111111",
"expireMonth": "12",
"expireYear": "2030",
"holderFirstName": "John",
"holderLastName": "Smith",
"cvv": "123"
}
},
"jsGeneratedData": "JS_GENERATED_DATA",
"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",
"district": "SOMA"
},
"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
flatPriceObjectRequiredCurrent recurring amount and currency for each formal billing cycle.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.
periodObjectOptionalSubscription 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
threeDUnionParamsObjectOptional3DS processing parameters.threeDSMethodDataStringOptional3DS Method data.creqStringOptional3DS Challenge request parameter.
paymentMethodObjectOptionalPayment method details.typeString(32)OptionalPayment method type.cardInfoObjectOptionalCard information inside the payment method.firstSixDigitsStringOptionalFirst six digits of the card number.lastFourDigitsStringOptionalLast four digits of the card number.issuringBankStringOptionalIssuing bank.isoCountryStringOptionalIssuing country.paymentBrandStringOptionalPayment brand.cardTypeStringOptionalCard type.cardLevelStringOptionalCard level.lastNameStringOptionalCardholder last name.firstNameStringOptionalCardholder first name.ipCountryStringOptionalIP country.isoCountryA2StringOptionalISO 3166-1 alpha-2 country code.
cardInfoObjectOptionalCard information.firstSixDigitsStringOptionalFirst six digits of the card number.lastFourDigitsStringOptionalLast four digits of the card number.issuringBankStringOptionalIssuing bank.isoCountryStringOptionalIssuing country.paymentBrandStringOptionalPayment brand.cardTypeStringOptionalCard type.cardLevelStringOptionalCard level.lastNameStringOptionalCardholder last name.firstNameStringOptionalCardholder first name.ipCountryStringOptionalIP country.isoCountryA2StringOptionalISO 3166-1 alpha-2 country code.
authenticationInfoObjectOptionalPayment authentication details.threeDSecureStringOptional3DS verification indicator.cvvResultStringOptionalCVV verification result, Y/N.avsResultStringOptionalAVS verification result.
actionObjectOptionalFollow-up payment action details.typeStringOptionalNext action type.qrCodeStringOptionalQR code content.qrUrlStringOptionalQR code URL.paymentRedirectUrlStringOptionalPayment redirect URL.jsSdkUrlStringOptionalJS SDK URL.
issuerInfoObjectOptionalIssuer response information.issuerResultCodeStringOptionalIssuer result code.issuerResultMsgStringOptionalIssuer result message.
merchantSubscriptionIdString(64)RequiredMerchant-defined unique subscription plan ID.requestIdString(64)RequiredUnique merchant 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.
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)OptionalSubscription 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.threeDContinueString(32)OptionalWhether 3DS continuation is required.partnerTransactionIdString(64)OptionalMerchant transaction ID of the initial/current period payment, formatted assubscriptionId_P{period}.transactionIdString(64)OptionalPingPong transaction ID of the initial/current period payment.remarkString(255)OptionalMerchant extension field, echoed as-is.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",
"requestId": "REQ_SUB_CREATE_001",
"subscriptionId": "SUB-1234567890abcdef",
"status": "ACTIVE",
"resultCode": "000000",
"resultMessage": "Transaction succeeded",
"partnerTransactionId": "SUB-1234567890abcdef_P1",
"transactionId": "26101600000352284454",
"remark": "test subscription",
"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
},
"threeDContinue": "Y",
"threeDUnionParams": {
"threeDSMethodData": "THREEDS_METHOD_DATA",
"creq": "CREQ_VALUE"
},
"paymentMethod": {
"type": "CARD",
"cardInfo": {
"firstSixDigits": "411111",
"lastFourDigits": "1111",
"issuringBank": "CHASE",
"isoCountry": "US",
"paymentBrand": "VISA",
"cardType": "CREDIT",
"cardLevel": "PLATINUM",
"lastName": "Lebron",
"firstName": "James",
"ipCountry": "US",
"isoCountryA2": "US"
}
},
"cardInfo": {
"firstSixDigits": "411111",
"lastFourDigits": "1111",
"issuringBank": "CHASE",
"isoCountry": "US",
"paymentBrand": "VISA",
"cardType": "CREDIT",
"cardLevel": "PLATINUM",
"lastName": "Lebron",
"firstName": "James",
"ipCountry": "US",
"isoCountryA2": "US"
},
"authenticationInfo": {
"threeDSecure": "Y",
"cvvResult": "Y",
"avsResult": "U"
},
"action": {
"type": "PAYMENT_REDIRECT_URL",
"qrCode": "QR_CODE_CONTENT",
"qrUrl": "https://merchant.example.com/qr.png",
"paymentRedirectUrl": "https://merchant.example.com/payment/redirect",
"jsSdkUrl": "https://pay-cdn.pingpongx.com/sdk.js"
},
"issuerInfo": {
"issuerResultCode": "00",
"issuerResultMsg": "APPROVED"
}
},
"code": "000000",
"description": "SUCCESS"
}