Integration Setup

Mambu Setup

Transaction channels

  1. Create a new one or select one of the existing transaction channels. Copy the ID of the selected channel. This channel will be used by MPO to perform all loan repayments and savings deposits in the future. Make sure you have selected a channel accessible by your MPO user.

Custom fields

  1. Create a new custom field for the Clients entity for saving GoCardless customer ID. You can add this field to any existing Standard Custom Field Set or you can create a new standard custom field for this. Copy the ID of this field. Also, grant access to this field for your API user (or its role). Client ID custom field
  2. Switch to the Loan Accounts tab and create two new custom fields for saving the GoCardless mandate ID and mandate reference. You can add this field to any existing Standard Custom Field Set or create a new one (Standard). Grant access to this field for your API user (or its role). Copy the ID of this field as it will be needed later. Loan mandate ID custom field
  3. Create a user linked custom field on the Loan Account level. This field is needed to select an assigned user. This user will receive notifications regarding the process. User link custom field part 1 User link custom field part 2 Grant access to this field for your API user (or its role). Copy ID of this field, it iwll be needed later.
  4. Switch to Deposit Accounts tab and create two new custom fields for saving GoCardless mandate ID and mandate reference. You can add this field to any existing Standard Custom Field Set or create a new standard field. Grant access to this field for your API user (its role). Copy the ID of this field, it will be needed later. Deposit mandate ID custom field
  5. Switch to the Groups tab and create a new custom field for saving the GoCardless client ID. You can add this field to any existing Standard Custom Field Set or create a new one (Standard). Grant access to this field for your API user (or its role). Copy the ID of this field, it will be needed later.
  6. Create a new custom field for the Transactions entity for saving the GoCardless payment ID. You can add this field to any existing Standard Custom Field Set or create a new standard field. Grant access to this field for your API user (or its role) and make sure this field is available for the transaction channel created earlier. Copy the ID of this field, it will be needed later. Transaction GoCardless payment id

Direct Debit repayment due webhook

This step should be completed after you have imported the connector into MPO.

To enable loan repayments via Direct Debit you additionally need to configure a Mambu webhook.

Please select Opt-Out under Option so that this webhook is enabled for all customers by default.

  • Target : Client or Group
  • On Event : Unpaid Repayment Due, and set the desired value for Due in <#> days
  • When : Select the custom field created for holding your GoCardless mandate ID from the dropdown list and choose Not empty
  • Webhook URL : enter the webhook URL for the Create loans DD payment request [for Mambu webhooks] process (located in the Main processes > Loan account folder). Again, to find the webhook URL you will need to open the process, click on the Start node and select Copy webhook URL via JSON from the info panel
  • Request Type : POST
  • Content Type : application/json.
  • For the payload body you can use:
    {
        "amount": "{REPAYMENT_TOTAL_BALANCE}",
        "paymentDate": "FORMAT_DATE{PAYMENT_DUE_DATE,datePattern=yyyy-MM-dd}",
        "currency": "GBP",
        "description" : "Loan repayment for {ACCOUNT_ID}",
        "loanAccountId":"{ACCOUNT_ID}"
    }
    

GC. Create webhook endpoint

GC. Create webhook endpoint

MPO Setup

Import connector

  1. Login to your MPO environment. Press the Create button and select the From file option. MPO. File import
  2. Select the json file with the pre-integration template you downloaded from the connector GitLab repository and click Open. Please wait until the upload is complete, it can take some time. Once the connector has been imported, you will see a GoCardless vX.X.X folder in your workspace.

Initial setup

  1. Open the Setup process process, switch to View mode, and press New task. Fill in all the parameters with the previously obtained values, such as your Mambu API user username and password and GoCardless API token and press Add task. Wait until the task is processed, you will be able to follow visually as the process steps are completed. MPO. Setup MPO. File import Alternatively, you can use the following JSON. Modify it and paste into the Code editor tab.

{
    "clientGocardlessIdCustomfieldName": "gcClientId",
    "defaultTaskAssigneeKey": "mambuUserKey",
    "gocardlessToken": "my-token",
    "gocardlessUrl": "api-sandbox.gocardless.com",
    "groupGocardlessIdCustomfieldName": "gcGroupId",
    "loanAssignedUserCustomfieldName": "name of my user link field",
    "loanMandateIdCustomfieldName": "gcMandateId",
    "mambuChannelForGocardlessTrns": "gocardless",
    "mambuPassword": "mypassword",
    "mambuUrl": "myenv.mambu.com",
    "mambuUser": "myuser",
    "notificationChannel": "please select one of -- ZenDesk, task",
    "savingsMandateIdCustomfieldName": "gcSavingsMandateId",
    "trnsChannelGocardlessPaymentIdCustomfieldName": "gcPaymentId",
    "webhookUrl": "url of your enadpoint - for POST application/JSON",
    "zenDeskGroupId": "ZenDesk group id -- if you use ZenDesk",
    "zenDeskLogin": "ZenDesk login -- if you use ZenDesk",
    "zenDeskApiKey": "ZenDesk API key -- if you use ZenDesk",
    "zenDeskSubdomain": "ZenDesk subdomain -- if you use ZenDesk",
    "timezone":"Mambu tenant timezone <ex: Europe/Madrid>"
}

Retrieve webhook URL

In Main processes sub-folder of GoCardless folder select the GoCardless callbacks processing endpoint [To be linked with GC] process. Then click on the i icon. Press Webhook on the panel on the right and select Copy webook via JSON. Save the copied URL. MPO. Webhook

GoCardless Setup

Create webhook endpoint

  1. Login to your GoCardless dashboard, open the Developer tab, press Create and select the Webhook endpoint option. GC. Adding a webhook
  2. Fill out the name and provide the webhook URL you obtained during the MPO setup. Press Create webhook endpoint. GC. Create webhook endpoint
  3. Setup is now complete.

Testing the integration

  1. To test the connector you can open the _test_Full loan origination (mock UI) process in the Example-Full loan origination sub-folder. Switch to view mode and add a new task. This process will create a new loan account, register the account owner in GoCardless, register the payer account’s data in GoCardless, create a mandate, and link it with this new loan account.

Monitoring and error reporting

While the connector is enabled you can view statistics on the number of payments which have been processed over a given time frame. Any errors will also be logged and tasks created in Mambu and assigned to a specific user to deal with them.

Activity dashboard

For monitoring purposes you can use the Activity dashboard which can be found in the GoCardless folder in MPO. MPO. Dashboard Detailed information about all callbacks/events/payment requests can be found in GoCardless vX.X (YYYY-MM-DD)/processes/state diagrams in Callbacks database/Events database/Payments database. In order to check this information: open the appropriate object, switch to View mode, and click on the desired block. You can see all the objects in the panel that appears on the right. MPO. State diagram

Notification about failures and important events

Nr.EventActionsComments
1Payment request failure (triggered by the Mambu webhook as described above)MPO creates a task.The task is assigned to the Customer’s credit officer. If there is no officer assigned, the task is assigned to default assignee specified in the MPO Setup process.
2The following mandate causes:
mandate_cancelled
mandate_expired
bank_account_closed
mandate_reinstated
invalid_bank_details
authorisation_disputed
direct_debit_not_enabled
bank_account_transferred
MPO creates a task as described in 1.
3Payment cause
chargeback_settled
MPO creates a task as described in 1.
4All payment causes, except
payment_confirmed
chargeback_settled
payment_created
customer_approval_granted
payment_submitted
payment_paid_out
payment_retried
MPO creates a task as described in 1.