We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Postponing a Subscription Renewal Date

Function

Postpones the next renewal date of an auto-renewable subscription.

NOTE

After you postpone a user's subscription renewal date, it is recommended that you send out emails or in-app notifications to notify the user of the change.

Scenario

When you launch some preferential activities within your app, for example, rewarding users with product use duration, you can call this API to postpone the users' next subscription renewal dates. After the renewal date is successfully postponed:

  • The IAP server sends a postponement success notification to your app server.

  • The user can continue to use the paid service and content and will not be charged during the extended period.

  • The system updates the subscription renewal date, and the next billing cycle will begin on the new, postponed expiration date.

Constraints

Subscription renewal date postponements are subject to the following restrictions:

  1. Only subscriptions in active state can be extended. Delaying the renewal date for expired subscriptions is not supported.

  2. Renewal date postponement is not supported for subscriptions during the free trial period.

  3. Each subscription can be postponed a maximum of two times within a 365-day period.

  4. Each API call can postpone the subscription renewal date by 1 to 90 days.

Prototype

  • Protocol: HTTPS POST

  • Direction: Your server -> IAP server

  • API URL: {rootUrl}/subscription/harmony/v1/application/subscription/renewal/modify

    Note: The value of rootUrl varies depending on the site. For details, please refer to Site Information.

  • Data format:

    Request: Content-Type: application/json; charset=UTF-8

    Response: Content-Type: application/json; charset=UTF-8

Request Parameters

Request Header

Expand
Parameter Mandatory Type Description
Content-Type Yes String Content type. The value is application/json;charset=UTF-8.
Authorization Yes String Authentication information. JWT is used for authentication. For details, please refer to Authorization Description.

Request Body

Expand
Parameter Mandatory Type Description
purchaseOrderId Yes String Order ID of a purchase. The value contains a maximum of 256 characters.
purchaseToken Yes String Purchase token of a product, which you can obtain from the information returned after a purchase or an order query. The value contains a maximum of 256 characters.
requestId Yes String Request ID. It is a unique identifier generated on your side to track each subscription renewal date postponement request.
modifyReason Yes Integer

Reasons for subscription date postponement:

0: free gift.

1: purchase.

2: in-app service issue or service interruptions.

extendByDays Yes Integer Number of days the subscription renewal date can be postponed. The value ranges from 1 to 90.

Request Example

Collapse
Word wrap
Dark theme
Copy code
  1. POST /subscription/harmony/v1/application/subscription/renewal/modify
  2. Content-Type: application/json;charset=UTF-8
  3. Authorization: Bearer ***.***.***
  4. Accept: application/json
  5. {
  6. "purchaseToken": "***.*.***",
  7. "purchaseOrderId": "***.*.***",
  8. "requestId": "******",
  9. "modifyReason": 0,
  10. "extendByDays": 10
  11. }

Response Parameters

Response Header

Expand
Parameter Mandatory Type Description
Content-Type Yes String Content type. The value is application/json;charset=UTF-8.

Response Body

Expand
Parameter Mandatory Type Description
responseCode Yes String

Response code.

0: success.

Other values: Failure. For details, please refer to error codes.

responseMessage No String Response description.
newExpirationTime Yes Long Expiration time of the subscription period after the postponement. It is a standard timestamp, for example, 1737354632136.

Response Example

Collapse
Word wrap
Dark theme
Copy code
  1. HTTP/1.2 200 OK
  2. Content-Type: application/json; charset=UTF-8
  3. Content-Length: 68
  4. {
  5. "responseCode": "0",
  6. "newExpirationTime": 1597679570777
  7. }
Search in References
Enter a keyword.