Skip to main content
The Mambu Payments connector ships three families of plugins on top of the Mambu Payments datasource: DisableSearch, relation plugins that add the links the Numeral API does not expose natively, and action plugins that expose payment operations (create, approve, cancel, verify) as actions.
The Mambu Payments connector is only available for Ruby (gem forest_admin_datasource_mambu_payments).
Nothing is registered automatically: opt each plugin in. DisableSearch and the relation plugins install at the datasource level (@create_agent.use), and raise an ArgumentError when installed on a single collection. The action plugins install at the collection level (collection.use) and take the registered Datasource instance as their datasource option.
ForestAdminDatasourceMambuPayments::Plugins::DisableSearch removes the search bar from all 17 Mambu collections. The Numeral API has no free-text search, and the OR condition Forest builds to emulate one is refused by the datasource, so without this plugin a search returns an error.

Relation plugins

Every relation plugin lives under ForestAdminDatasourceMambuPayments::Plugins::Relations and takes no option: @create_agent.use(<plugin>, {}). Install only the links you need — each one adds API calls when the relation is displayed. The target collection already carries the foreign key, so these plugins only declare the one-to-many relation on the host. An account holder is reached through an account. These plugins import account_holder_id from the related account (read-only), add a many-to-one to MambuAccountHolder on the host, and add the reverse one-to-many on MambuAccountHolder. A filter on the holder is resolved by listing the intermediate accounts of that holder first. The target collection has no foreign key to the host at all. These plugins add a virtual foreign key column on the target — always empty on a record, filterable with EQUAL and IN only — and the one-to-many on the host. Opening the relation lists the intermediate collection first, then filters the target on the ids it found.
LinkInternalAccountToBalances and LinkInternalAccountToPaymentOrders resolve through the connected accounts: they list every balance or payment order of the connected accounts the internal account belongs to, not only the ones tied to that internal account.
A resolution reads at most 10,000 intermediate records and logs a warning when it reaches that cap.

Action plugins

Every action plugin lives under ForestAdminDatasourceMambuPayments::Plugins::SmartActions, installs on any collection with collection.use, and requires the datasource option. The host collection does not need to be a Mambu collection: an action plugin reads the Mambu id from the column you name in record_id_field, so a collection of your own database that stores a Mambu id works as well as the Mambu collection itself.

Create actions

Single-scope actions that create a resource from the values of their form.

Update actions

Single-scope actions that update the resource whose id is in record_id_field. Every form field is optional: an empty field keeps the current value, and an empty form is refused.

Payment order and verification actions

These actions act on every selected record and call the API once per id. A failure on one id does not stop the others: the success message counts the records processed and lists the ids that failed (the failure details go to the log). The action reports an error only when every id failed, and that error carries the API’s message for the first failure.
Update actions follow the same per-id behavior. A create action makes a single call: when the API rejects it, the action fails with the API’s own error message.