Updated on 2025-01-17 GMT+08:00

Interface Functions

Before releasing a SaaS product to KooGallery, develop a service interface on the ISV server by referring to this access guide.

  • Only one service interface for a SaaS product needs to be configured to accommodate different scenarios, including subscription, renewal, expiration, release, and upgrade.
  • If you release a yearly/monthly product, the interface will be called in the subscription, renewal, expiration, and release scenarios.
  • If you release a product billed by one-time payment, the interface will be called only in the subscription and release scenarios.
  • If you release a pay-per-use product, the interface will be called in the subscription, resource status change, release, and usage push scenarios.
  • If the product can be upgraded, the interface will be called in the upgrade scenario.

Functions

  • Subscription: After a customer purchases a product and pays for it successfully, KooGallery calls this interface to send you a request containing information about the product and customer. When receiving the request, the ISV server executes product subscription and informs KooGallery about the subscription result.

    When a customer clicks the View Resource Details button on the Purchased Apps page, KooGallery calls the subscription interface in real time to query the product information. Therefore, the ISV server needs to perform idempotence processing when processing requests. KooGallery may resend requests for a single order. If receiving a duplicate order, your server needs to return a success response and the information about the successfully created app instance, rather than create a SaaS instance.

  • Renewal: 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.
  • Expiration: When a purchased product expires, KooGallery calls the interface to send you a notification. After receiving an expiration notification, you must freeze the purchased product and inform KooGallery about the freezing result.

    When a purchased product expires, the retention period starts. The retention period varies with the customer tier and can be up to 15 days long. During the retention period, the product is frozen and cannot be used. The customer can continue using the product after renewal. Therefore, you need to set a retention period to no less than 15 days for your SaaS products and retain customer data during the retention period.

  • Resource release: If a customer does not renew an expired product in the retention period, or the customer has unsubscribed from the product, KooGallery releases the purchased product and calls the interface to send you a notification. Upon receiving the notification, delete the specified instances and inform KooGallery about the deletion result.
  • Upgrade: After a customer places an order for upgrading a purchased product, KooGallery calls the interface to request you to upgrade the product. The ISV server then upgrades the product and informs KooGallery about the upgrade result. The upgrade scenario is optional.
  • After a customer purchases a pay-per-use product (or package), when the instance expires, the customer violates regulations, or the customer account is in arrears, KooGallery calls this interface to freeze the instance.

Interface Failure Scenarios and Retry Mechanism

  • In subscription and upgrade scenarios, if the service interface fails to respond, KooGallery will retry for 3 hours.

    If the interface exception is rectified, the next call will be successful and the order will be placed successfully. If the exception persists after 3 hours, KooGallery determines that the order fails to be placed and automatically cancels the order.

  • In the renewal scenario, if the service interface fails to respond, KooGallery will retry for an hour.

    If the interface exception is rectified, the next call will be successful and the order will be placed successfully. If the exception persists after an hour, KooGallery determines that the order fails to be placed. In this case, locate and rectify the exception. Then go to the Seller Console, locate the order on the Application Tools > Service Interface Messages page, and click Restart Debugging in the same row to call the interface again.

  • In product expiration and resource release scenarios, if the service interface fails to respond, KooGallery will retry for an hour.

    If the interface exception is rectified, the next call will be successful and the order will be placed successfully. If the exception persists after an hour, KooGallery determines that the order fails to be placed. In this case, locate and rectify the exception. Then go to the Seller Console, locate the order on the Application Tools > Service Interface Messages page, and click Restart Debugging in the same row to call the interface again.

    If a customer can still use expired resources due to an interface failure, you shall bear the resource loss incurred.

    If the service interface fails to respond, an email, SMS message, and private message will be sent to you. Check the email address and mobile number bound to your account and the Message Center on Huawei Cloud.

    If more than five orders failed in a month due to interface failures, KooGallery will remove the product from the catalog.

    If an order is automatically canceled due to an interface failure, contact the customer at the earliest to handle the problem.