Configuring monetization on VMware

You can optionally configure monetization in API Connect on a VMware virtual machine by enabling the billing microservice.

Before you begin

Important: If the optional billing microservice is enabled, you must increase the memory for the API Manager for VMware component by 0.5 GB.

About this task

API Connect includes a subscription billing microservice that allows API providers to define pricing plans in their API Products, and monetize their API offerings. If a Product contains a pricing plan, API Consumers must enter their payment information into the Developer Portal before they can subscribe to that plan. API Connect supports integration with Stripe Subscription Billing, an independent cloud service that manages monetized product plans, customers, their payment information, and their subscription history, in order to generate monthly invoices and charge customers automatically. With this integration, Stripe serves as both the subscription billing system and the payment processing system.

Note:
  • These instructions apply only to VMware installations. For Kubernetes installations, see Configuring monetization on Kubernetes.
  • To use Stripe as your credit card processing vendor, you must have port 443 open to HTTPS communication between the Stripe API and your Developer Portal management and the Management cluster servers. See Firewall requirements on Kubernetes and Firewall requirements on VMware for more information about this requirement.
  • Provider organizations cannot add any billing integrations until the billing microservice is enabled.
  • After provider organizations have added billing integrations, the billing microservice must not be disabled.
  • All of the commands must be run in the apicup management project directory.
To enable or disable the billing microservice, you must configure a management subsystem extra-values file. See the following instructions:

Procedure

  • Enabling the billing microservice
    1. Create, or edit if one already exists, a management subsystem extra-values file in the apicup management project directory, and enter the following configuration details:
      spec:
        billing:
          enabled: true
    2. Save the extra-values file with a filename of your choice, but it must have a .yaml or .yml extension.
    3. Update the VMware extra-values-file attribute to point to the new or updated management subsystem extra-values file.
      Run the following apicup command to insert the location of the extra-values file:
      apicup subsys set <mgmt_subsystem_name> extra-values-file <extra_values_file_path_and_name>
      Where:
      • <mgmt_subsystem_name> is the name of the management subsystem that you are configuring.
      • <extra_values_file_path_and_name> is the fully qualified path and name of your extra-values file.
      For example:
      apicup subsys set ds10-management extra-values-file /workspace/v10011/monetization.yaml
    4. Verify that the configuration settings are valid in the apiconect-up.yaml by running the following command:
      apicup subsys get <mgmt_subsystem_name> --validate
      The output lists each setting and adds a check mark after the value once the value is validated. If the setting lacks a check mark and indicates an invalid value, reconfigure the setting.
    5. Update the management VMware with the updated billing value.
      Install the new setting for the billing microservice by running the following command:
      apicup subsys install <mgmt_subsystem_name> --debug
      Including the --debug option enables the debug output for the command.
    6. Monitor the health-check output until the management subsystem is healthy by running the following command:
      apicup subsys health-check <mgmt_subsystem_name>
      If one or more of the health criteria are not met, the command stops processing and displays a message with the failure, and exits with a status of 1. The following output is an example of unhealthy output while the install is running:
      Error: Cluster not in good health:
       ManagementCluster (current ha mode: active) is not ready | State: 15/17 Phase: Pending
       ManagementCluster (current ha mode: active) is not ready | State: 15/17 Phase: Pending
      When all of the health criteria are successfully met, the command displays no output, and exits with a status of 0.

      The billing microservice is now enabled, and provider organization owners can create billing integration resources for API providers in the API Manager UI. For more information, see Monetizing your Products.

  • Disabling the billing microservice
    Important: After provider organizations have added billing integrations, the billing microservice must not be disabled.
    1. Edit the management subsystem extra-values file in the apicup management project directory, and change the enabled configuration option to false:
      spec:
        billing:
          enabled: false
    2. Save the changed extra-values file.
    3. Verify that the configuration settings are valid in the apiconect-up.yaml by running the following command:
      apicup subsys get <mgmt_subsystem_name> --validate
      The output lists each setting and adds a check mark after the value once the value is validated. If the setting lacks a check mark and indicates an invalid value, reconfigure the setting.
    4. Update the management VMware with the altered billing value.
      Install the updated setting for the billing microservice by running the following command:
      apicup subsys install <mgmt_subsystem_name> --debug
      Including the --debug option enables the debug output for the command.
    5. Monitor the health-check output until the management subsystem is healthy by running the following command:
      apicup subsys health-check <mgmt_subsystem_name>
      If one or more of the health criteria are not met, the command stops processing and displays a message with the failure, and exits with a status of 1. The following output is an example of unhealthy output while the install is running:
      Error: Cluster not in good health:
       ManagementCluster (current ha mode: active) is not ready | State: 15/17 Phase: Pending
       ManagementCluster (current ha mode: active) is not ready | State: 15/17 Phase: Pending
      When all of the health criteria are successfully met, the command displays no output, and exits with a status of 0.

      The billing microservice is now disabled.