Link a collection module to a product module
Update a product module configuration so policies can use a collection module for payment collection.
Update a product module configuration so policies can use a collection module for payment collection.
Prerequisites
- Create the collection module in the same organisation as the product module.
- Publish a live version of the collection module.
Link the collection module
- Open
.root-config.jsonin the product module. - Go to
settings.billing.paymentMethodTypes. If any of these sections do not exist, add them. - Add the relevant collection module key to
collectionModules:
{
"settings": {
"billing": {
"paymentMethodTypes": {
"collectionModules": [
{
"key": "cm_acme_payments"
}
]
}
}
}
}Legacy product modules may use paymentMethodTypes.collectionModule.collectionModuleKeys. That form is still accepted but deprecated. Migrate to collectionModules when you next update the file.
- From the product module directory, push your changes:
rp pushrp push uploads the changed .root-config.json to Workbench as a new draft. Publish the product module before using the collection module link in production.
Related guides
- Workbench CLI commands — push and publish collection module changes.
- General settings — configure product module settings.
- Publish collection module version — publish the collection module before linking it for production use.
Updated 20 days ago