Updated on 2024-02-07 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, the ISV server needs to return a success response and the information about the successfully created application instance, rather than create a new 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 to call it 60 times (once every 3 minutes).

    If the interface exception is resolved, the next call will be successful and the order is placed successfully. Otherwise, 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 to call it 60 times (once every minute).

    If the interface exception is resolved, the next call will be successful and the order is placed successfully. Otherwise, KooGallery determines that the order fails to be placed. Locate and rectify the exception and send an email to partner@huaweicloud.com to notify KooGallery to call the interface again.

  • In product expiration and resource release scenarios, if the service interface fails to respond, KooGallery will retry to call it 60 times (once every minute).

    If the interface exception is resolved, the next call will be successful and the order is placed successfully. Otherwise, KooGallery determines that the order fails to be placed. Locate and rectify the exception. Then log in to the Seller Console, choose Application Tools > Service Interface Messages in the navigation pane, and click Restart Debugging in the Operation column containing the order that fails to be placed to call the interface again.

    If the product can still be used after it expires due to the interface response failure, you shall bear the loss incurred therefrom.

    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.