Updated on 2024-08-20 GMT+08:00

Renewal

Description

For yearly/monthly products, you must develop the renewal interface.

  • After a customer places an order for renewal or converts a trial order to a commercial order, KooGallery calls the interface to request you to extend the service. The service interface then updates the expiration date and informs KooGallery about the update result.
  • Ensure that the communication over the interface is normal. If the renewal fails, the service of the user may be terminated.
  • If the renewal interface fails to be called, KooGallery will call the interface again. You can view the interface exception information on the Application Tools > Service Interface Messages page. After the exception is solved, notify KooGallery to call the interface again.
    • Check the email address bound to your Huawei Cloud account. If you receive an email about an interface calling failure, resolve the exception as soon as possible.
    • KooGallery monitors interface exceptions. If renewals of a SaaS product frequently fail due to interface exceptions, KooGallery will remove the product from the catalog.

The following figure shows the process of renewing a service.

Request Message

The following table describes the request parameters.

Request method: GET

Parameter

Mandatory

Type

Maximum Length

Description

activity

Yes

String

20

Request ID, which is used to distinguish the scenario.

For renewals, the value is refreshInstance.

orderId

Yes

String

64

KooGallery order ID.

NOTE:

A new order will be generated during the renewal or renewal cancellation and has an ID different from that of a subscription order. Use instanceId to identify the resources.

instanceId

Yes

String

64

Instance ID.

productId

No

String

64

Product ID. If a customer renews a product and changes the billing cycle or a customer converts a trial product to a commercial product, a new productId is provided.

expireTime

Yes

String

20

Expiration time.

Format: yyyyMMddHHmmss

testFlag

No

String

2

Whether a request is submitted for debugging.

  • 1: debugging request.
  • 0: non-debugging request.

The default value is 0.

trialToFormal

No

String

2

Whether a request is submitted to convert a trial product to a commercial product.

  • Parameter not passed: no
  • 1: yes

By default, a request is not submitted to convert a trial product to a commercial product.

For a request submitted to convert a trial product to a commercial product, it is regarded by default that the instance is not billed in the pay-per-use mode.

authToken

Yes

String

50

Security verification token.

For details about the values, see authToken Value.

timeStamp

Yes

String

20

UTC timestamp when a request is initiated.

Format: yyyyMMddHHmmssSSS

periodType

No

String

10

Period type.

NOTE:

This parameter is only required for yearly/monthly product subscriptions (the value of chargingMode is set to 1).

Yearly subscription: year

Monthly subscription: month

periodNumber

No

integer

2

Number of periods.

NOTE:

This parameter is only required for yearly/monthly product subscriptions (the value of chargingMode is set to 1).

Enter a positive integer, for example, 1, 2, and 3.

orderAmount

No

bigdecimal

20

Order amount.

NOTE:

The amount is the actual payment amount, which you can check during reconciliation.

1. Renewal: The amount is 0 or a positive number containing up to three decimal places.

2. Renewal cancellation: The amount is a negative number containing up to three decimal places.

Unit: USD

Example request:

https://isvserver.com/produceAPI?activity=refreshInstance& expireTime=20180725000000&instanceId=03pf80c2bae96vc49b80b917bea776d7&orderId=HWS001014ED483AA1E8&timeStamp=20170725025113409&testFlag=0&authToken=09lsS5y+KCtxBu+ON4TXv1SrjH5KVYka9sx2MauHrQU=

Response Message

The following table describes the response parameters.

Parameter

Mandatory

Type

Maximum Length

Description

resultCode

Yes

String

6

Result code.

For details, see Invocation Result Codes.

resultMsg

No

String

255

Result message.

  • When processing an interface request, your server must ensure idempotency.
  • KooGallery may resend requests for a single order. When receiving a duplicate order, the ISV server needs to return a success response, rather than extend the SaaS instance again.

Example response:

{
    "resultCode":"000000",
    "resultMsg":"success."
}