Using a custom module for payment method creation

You can offer free use of your products to your customers or you can configure your Developer Portal to bill your customers when they use your products. You can use a custom module to configure creation of payment methods.

Before you begin

You must have administrator access to complete this task.

You must have configured billing support in API Manager.

Create your custom module. Your custom module needs to implement the consumerorg_payment_method_create_alter hook, so it needs to have a function like this:
my_custom_module_consumerorg_payment_method_create_alter(&$form, $integration, $billing) {
// do this payment function with $form

For more information, see Custom module development: background and prerequisites.


  1. If the administrator dashboard is not displayed, click Manage to display it.
  2. In the administrator dashboard, click Extend.
    The List tab for the Extend page opens, and the list of installed modules is displayed. The list shows all the modules that are installed. The enabled modules are displayed with a selected checkbox. The disabled modules are displayed without a selected checkbox.
  3. Click + Install new module, and either complete the Install from a URL field, or click Choose file to upload a filename.tar.gz module file from your local computer.
  4. Click Install.
    The Update manager confirms that the module was installed successfully.
  5. Click Enable newly added modules to return to the List tab for the Extend page.
  6. Find your newly added module in the list of modules, select its checkbox, and click Enable.
    Your newly added module is now enabled and available for you to use in the Developer Portal.
  7. In the administrator dashboard, click Configuration > System > IBM API Connect Billing Settings in the administrator dashboard.
  8. Change the drop-down option to be your newly enabled module for your billing provider.


You successfully enabled your payment method by using a custom module.