Transfer Flows

Retrieving transfer requirements

The process that retrieves the transfer requirements responds with the required transfer parameters based on the specific quote and selected target recipient account. For more details on the transfer requirements feature, see the transfers-requirements endpoint.

Transfer requirements

The 3.4. [EntryPoint] Get transfer requirements process handles this business flow.

Process payload

{
     "transferBody": {
          "targetAccount": "147774783",
          "customerTransactionId": "1941cc88-6afb-4a39-bb45-9be276626402",
          "quoteUuid": "e2451439-ff94-4146-9ff4-b6e1d65bb3cb",
          "details": {
               "reference": "Invoice RF12345",
               "transferPurpose": "To pay my bills.",
               "SourceOffunds": "Salary"
          }
     },
     "token": "e0581691-4e43-474f-88c9-f2583027608b",
     "language": "es"
}
ParameterTypeDescriptionRequired
transferBodyobjectAn object holding details about the transfer.Yes
transferBody.targetAccountintegerThe account number of the targeted account.Yes
transferBody.customerTransactionIdstringA unique string holding the transaction ID.Yes
transferBody.quoteUuidstringThe quote’s unique ID.Yes
transferBody.detailsobjectAn object holding the optional reference details.No
transferBody.details.referencestringA refenece value for the payment details.No
transferBody.details.transferPurposestringThe prurpose of the transaction.No
transferBody.details.sourceOfFundsstringWhere the funds for teh transaction come from.No
tokenstringThe client’s token, which is retrieved in the user creation and login process.Yes
languagestringThe language code, which can be found in Wise’s Language Support page.Yes

Getting an address using ID

Address

The 3.5 [Entry Point] Get address by id - v1 process handles this business flow.

Process payload

{
    "addressId": "7272341",
    "token": "76d8cee8-aa91-4038-9033-6054f2edb502"
}
ParameterTypeDescriptionRequired
addressIdstringThe client’s address ID, which is retrieved in the user creation and login process.Yes
tokenstringThe client’s token, which is retrieved in the user creation and login process.Yes

Creating transfers

The available transfer options are given by the configuredPayIn configuration field, which can have the following values:

  • "configuredPayIn": "TRUSTED_PRE_FUND_BULK": The only available transfer option is prefunded bulk transfers.
  • "configuredPayIn": "BANK_TRANSFER": The only available transfer option is bank transfers.
  • "configuredPayIn": "TRUSTED_PRE_FUND_BULK, BANK_TRANSFER": The connector supports bank transfers and prefunded bulk transfers for domestic payments.

Bank transfers

The 5. [EntryPoint] Payments Gateways Wise transfer flow process handles this business flow.

Based on the currency of the domestic transfer, the payment can be routed either through the Mambu Payment Gateway - if the sourceCurrency is EUR - or through ClearBank - if the sourceCurrency of the transfer is GBP. This routing mechanism is dictated by a config parameter that holds the pair of currencies of the domestic payment and the process ID of the Mambu Process Orchestrator (MPO) process that handles the payment:

"paymentRails": {
     "GBP": 28851,
     "EUR": 28800,
     "USD": 28851
}
ParameterTypeDescriptionRequired
paymentRailsobjectYes
paymentRails.GBPstringThe payment rail of a UK Pound-denominated transfers, which usually come from the ClearBank connector.Yes
paymentRails.EURstringThe process ID of a Euro-denominated transfers, which usually point to the Mambu Payment Hub rail.Yes
paymentRails.USDstringThe process ID of a US Dollar-denominated transfer.Yes

The **5.2. [Continue transfer flow -GBP [plug-in with other Payment Gateways] process can be adapted to support other currencies by adding a new condition that checks the value of the sourceCurrency and routes the payment to a dedicated payments Gateway. If the payment will be subjected to the anti-money laundering (AML) verification, the same logic should be applied in the AML Listener process.

Process payload
{
     "clientEmail": "jane.doe@gmail.com",
     "debtorIBAN": "RO15BTRLPDRCUKS0LNFYDZOZ",
     "recipient": {
          "id": 147771497,
          "business": null,
          "profile": 14733,
          "accountHolderName": "Diana Smith",
          "currency": "EUR",
          "country": "RO",
          "type": "iban",
          "user": 5474294,
          "active": true,
          "ownedByCustomer": false,
          "details": {
               "email": "dianaSmith@mail.com",
               "legalType": "PRIVATE",
               "IBAN": "RO94BTRLD19ACC5KPMF1I89X",
               "iban": "RO94BTRLD19ACC5KPMF1I89X"
          }
     },
     "token": "5ebf76a3-cf99-4148-9910-d8371f4e6463",
     "transferBody": {
          "targetAccount": 147771497,
          "customerTransactionId": "392a302e-fead-4a9a-b232-6fa413230002",
          "quoteUuid": "3baefb70-f70f-4a2b-aee9-b064bc33d843",
          "details": {
               "reference": "Invoice RF12345"
          }
     },
     "transferredAmount": 202,
     "language":"es"
}
ParameterTypeDescriptionRequired
clientEmailstringThe client’s email address, which is used to validate the user in the Wise backend.Yes
debtorIBANstringThe IBAN number of the debtor’s account.Yes
recipientobjectAn object containing details about the recipient.Yes
recipient.idstringThe recipient’s ID.Yes
recipient.businessstringThe recipient business name.Yes
recipient.profilestringThe recipient’s profile ID.Yes
recipient.accountHolderNamestringThe full name attached to the recipient’s account.Yes
recipient.currencystringThe three letter currency code for the recipient’s account.Yes
recipient.countrystringThe two letter country code for the country.Yes
recipient.typestringThe recipient’s account type.Yes
recipient.userintegerThe user ID of user that created or owns the recipient’s profile.Yes
recipient.activebooleanA boolean value to check if the recipient’s account is active. Values can be only true or false.Yes
recipient.ownedByCustomerbooleanA boolean value to check if the recipient’s account is owned by the transferer. Values can be only true or false.Yes
recipient.detailsobjectAn object holding the recipient’s personal details.Yes
recipient.details.emailstringThe recipient’s email address.Yes
recipient.details.legalTypestringThe type of legal entity that the recipient is Private for an individual and Business for a business.Yes
recipient.details.IBANstringThe recipient’s IBAN number.Yes
recipient.details.ibanstringThe recipient’s IBAN number.Yes
tokenstringThe client’s token, which is retrieved in the user creation and login process.Yes
transferBodyobjectAn object holding details about the transfer.Yes
transferBody.targetAccountintegerThe account number of the targeted account.Yes
transferBody.customerTransactionIdstringA unique string holding the transaction ID.Yes
transferBody.quoteUuidstringThe quote’s unique ID.Yes
transferBody.detailsobjectAn object holding the reference details.Yes
transferBody.details.referencestringContains the payment details.Yes
transferredAmountintegerThe transferred amount after the user requests the available quotes and transfer options.Yes
languagestringThe language code, which can be found in Wise’s Language Support page.Yes

Bank transfer flows

The flow is split into two parts: the steps common to all flows and steps unique to either the Mambu Payment Gateway or another third-party payment gateway. The following steps are common to all bank transfer flows:

  • Get the Mambu deposit accountID by IBAN. The IBAN can be linked to the deposit account either by External Account Representation (EAR) or stored in a dedicated custom field.
  • Create the Wise transfer.
  • Process routing based on the transfer sourceCurrency and the configured paymentRails.
  • After the transfer is created the twTransferId is returned to the UI, and the payment flow continues in the background.
Mambu Payment gateway

The following steps apply when using the Mambu Payment Gateway:

  • Start the payment in the Mambu Payment Gateway.
  • Start the payment in Mambu.
  • Retrieve the payment status retrieval:
    • If the payment is accepted, where the ACSP value is returned: The process continues with the update of the TWTransferID and transferStatusField custom fields at the withdrawal transaction level in Mambu.
    • If the payment is rejected, where the RJCT value is returned: The Wise transfer is cancelled.
Other payments gateways

The following steps apply when using any other payment gateway:

  • Create a withdrawal in Mambu.
  • Patch the Wise transfer ID at the withdrawal level in Mambu.

PG transfers

Please Note:
The transfer transaction can be verified by an AML system. The extension point for this plug-in can be found in the second part of the transfer process - after the successful withdrawal transaction. The payment is identified via a boolean parameter that shows the origin of the transaction: isPaymentGatewayTransfer : true.

Prefunded transfers

The 4. [EntryPoint] PREFUND Wise transfer flow** process handles this business flow.

This option allows Wise to start processing a transfer before receiving funds from the sending customer, based on a guarantee from the bank partner that will be settled the funds in the future. In this way, Wise can provide a faster service to the sending customer. The domestic payment is replaced by a bulk reconciliation agreement between the bank and Wise.

Process payload
{
     "clientEmail": "jane.doe@gmail.com",
     "depositAccountId": "XYZW123",
     "userDepositAccountCurrency" : "GBP",
     "recipient": {
          "id": 147771497,
          "business": null,
          "profile": 14733,
          "accountHolderName": "Diana Smith",
          "currency": "EUR",
          "country": "RO",
          "type": "iban",
          "user": 5474294,
          "active": true,
          "ownedByCustomer": false,
          "details": {
               "email": "dianaSmith@mail.com",
               "legalType": "PRIVATE",
               "IBAN": "RO94BTRLD19ACC5KPMF1I89X",
               "iban": "RO94BTRLD19ACC5KPMF1I89X"
          }
     },
     "token": "5ebf76a3-cf99-4148-9910-d8371f4e6463",
     "transferBody": {
          "targetAccount": 147771497,
          "customerTransactionId": "392a302e-fead-4a9a-b232-6fa413230002",
          "quoteUuid": "3baefb70-f70f-4a2b-aee9-b064bc33d843",
          "details": {
               "reference": "Invoice RF12345"
          }
     },
     "sourceCurrency" : "GBP",
     "transferredAmount": 202,
     "language":"es"
}
ParameterTypeDescriptionRequired
clientEmailstringThe client’s email address, which is used to validate the user in the Wise backend.Yes
depositAccountIdstringThe client’s Mambu account ID.Yes
userDepositAccountCurrencystringThe three letter currency code of the client’s Mambu account currency.Yes
recipientobjectAn object containing details about the recipient.Yes
recipient.idstringThe recipient’s ID.Yes
recipient.businessstringThe recipient’s business name.Yes
recipient.profilestringThe recipient’s profile ID.Yes
recipient.accountHolderNamestringThe full name attached to the recipient’s account.Yes
recipient.currencystringThe three letter currency code for the recipient’s account.Yes
recipient.countrystringThe two letter country code for the country.Yes
recipient.typestringThe recipient’s account type.Yes
recipient.userintegerThe user ID of teh user that created or owns the recipients account.Yes
recipient.activebooleanA boolean value to check if the recipient’s account is active. Values can be only true or false.Yes
recipient.ownedByCustomerbooleanA boolean value to check if the recipient’s account is owned by the transferer. Values can be only true or false.Yes
recipient.detailsobjectAn object holding the recipient’s personal details.Yes
recipient.details.emailstringThe recipient’s email address.Yes
recipient.details.legalTypestringThe type of legal entity that the recipient is Private for an individual and Business for a business.Yes
recipient.details.IBANstringThe recipient’s IBAN number.Yes
recipient.details.ibanstringThe recipient’s IBAN number.Yes
tokenstringThe client’s token, which is retrieved in the user creation and login process.Yes
transferBodyobjectAn object holding details about the transfer.Yes
transferBody.targetAccountintegerThe account number of the targeted account.Yes
transferBody.customerTransactionIdstringA unique string holding the transaction ID.Yes
transferBody.quoteUuidstringThe quote’s unique ID.Yes
transferBody.detailsobjectAn object holding the reference details.Yes
transferBody.details.referencestringContains the payment details.Yes
sourceCurrencystringThe three letter currency code for the source currency of the transfer.Yes
languagestringThe language code, which can be found in Wise’s Language Support page.Yes

Prefunded transfer flows

The first part of the flow involves:

  1. Creating the Wise transfer.
  2. The Mambu withdrawal with mapping to Wise custom fields: transferId and fields from the recipient, transfer, and fees objects.
  3. Updating the Wise transferStatus custom field at the withdrawal transaction level in Mambu.
  4. Process routing based on the AMLcheck option saved in the configuration.

Depending on the amlExtensionUsed parameter, one of two cases below will occur:

  • If amlExtensionUsed = true: After the transfer is created and associated with the Wise transfer ID, and the withdrawal is made, the twTransferId value is returned to the UI. The payment flow continues in the background.
  • If amlExtensionUsed = false: After the transfer is created and associated with the Wise transfer ID, and the withdrawal is made, the twTransferId, token, transferBody, transferredAmount, withdrawal objects and depositAccountId are returned to the UI. The payment flow then ends.

The second part of the flow - 4.1. Prefund Wise transfer flow (2nd part) sync API - should be called separately with the response from the first call - 4. PREFUND Wise transfer flow (before AML). The Notes field is populated with the transfer reference details if they are sent, otherwise only the default text Wise Transfer [reference] details: will be mapped.

EntryPoint_PREFUND_Wise_transfer_flow

The second part of the flow involves:

  1. Funding the Wise transfer.
  2. Depositing the withdrawal amount in the settlement account in Mambu, and mapping the Wise transferId custom field.

This second part can be triggered by the 4.1. [EntryPoint] PREFUND Wise transfer flow (2nd part) sync API process.

Process payload

All the required parameters are returned by the sync API from the first part.

{
     "twTransferId": "50006850",
     "token": "679e947f-0ac1-4ac5-abcd-11af2fedcf27",
     "transferBody": {
               "targetAccount": 147799103,
               "customerTransactionId": "7abac1e2-87e3-11eb-8dcd-0242ac130506",
               "quoteUuid": "c3cc70a2-a98a-4514-8646-0dd4cf7efb8e"
     },
     "transferredAmount": 20,
     "depositAccountId": "BCLX995",
    "withdrawal": {
          "encodedKey": "8a01393f7b98266d017b9a48651b3038",
          "id": "432344",
          "creationDate": "2021-08-31T11:47:45+03:00",
          "valueDate": "2021-08-31T11:47:45+03:00",
          "bookingDate": "2021-08-31T11:47:45+03:00",
          "parentAccountKey": "8a012ea378f34e470178f96fa2ac2559",
          "type": "WITHDRAWAL",
          "amount": -20,
          "currencyCode": "EUR",
          "affectedAmounts": {
               "fundsAmount": 20,
               "interestAmount": 0,
               "feesAmount": 0,
               "overdraftAmount": 0,
               "overdraftFeesAmount": 0,
               "overdraftInterestAmount": 0,
               "technicalOverdraftAmount": 0,
               "technicalOverdraftInterestAmount": 0,
               "fractionAmount": 0
          },
          "taxes": {},
          "accountBalances": {
                "totalBalance": 5465.32
          },
          "userKey": "8a014036786faa2c01787cdfaab55583",
          "terms": {
               "interestSettings": {},
               "overdraftInterestSettings": {},
               "overdraftSettings": {}
          },
          "transactionDetails": {
               "transactionChannelKey": "8a012cf47502ded501750768496b1584",
               "transactionChannelId": "TWLP"
          },
          "transferDetails": {},
          "fees": []
    }
}
ParameterTypeDescriptionRequired
twTransferIdstringThe Wise transfer ID.Yes
tokenstringThe client’s token, which is retrieved in the user creation and login process.Yes
transferBodyobjectAn object holding details about the transfer.Yes
transferBody.targetAccountintegerThe account number of the targeted account.Yes
transferBody.customerTransactionIdstringA unique string holding the transaction ID.Yes
transferBody.quoteUuidstringThe quote’s unique ID.Yes
transferredAmountintegerThe transferred amount after the user requests the available quotes and transfer options.Yes
depositAccountIdstringThe client’s Mambu account ID.Yes
withdrawalobjectAn object containing details about the withdrawal.Yes
withdrawal.encodedKeystringA unique identifier for the withdrawal transaction.Yes
withdrawal.idstringThe ID of the withdrawal transaction.Yes
withdrawal.creationDatestringThe date when the withdrawal was made in the YYYY-MM-DD"T"HH:mm:ssTZ format.Yes
withdrawal.valueDatestringThe date when assets either become available to the account owner (in the case of a credit entry), or cease to be available to the account owner (in the case of a debit entry). In Mambu, this is refered to as the account Transaction Date and is in the YYYY-MM-DD"T"HH:mm:ssTZ format.Yes
withdrawal.bookingDatestringThe date when the booking was made in the YYYY-MM-DD"T"HH:mm:ssTZ format.Yes
withdrawal.parentAccountKeystringThe foreign key to the deposit account this transaction refers to.Yes
withdrawal.typestringThe transaction type, which in this instance will be WITHDRAWAL.Yes
withdrawal.amountintegerThe amount being withdrawn.Yes
withdrawal.currencyCodestringThe three letter currency code for the currency of the withdrawal.Yes
withdrawal.affectedAmountsobjectAffected amounts for a withdrawal.Yes
withdrawal.affectedAmounts.fundsAmountintegerThe funds amount for witdrawals.Yes
withdrawal.affectedAmounts.interestAmountintegerThe interest amount for affected amounts.Yes
withdrawal.affectedAmounts.feesAmountintegerThe fees amount for affected amounts.Yes
withdrawal.affectedAmounts.overdraftAmountintegerThe overdraft amount for affected amounts.Yes
withdrawal.affectedAmounts.overdraftFeesAmountintegerThe overdraft fee amount for affected amounts.Yes
withdrawal.affectedAmounts.overdraftInterestAmountintegerThe overdraft interest amount for affected amounts.Yes
withdrawal.affectedAmounts.technicalOverdraftAmountintegerThe technical overdraft amount for affected amounts.Yes
withdrawal.affectedAmounts.technicalOverdraftInterestAmountintegerThe technical overdraft interest amount for affected amounts.Yes
withdrawal.affectedAmounts.fractionAmountintegerThe fraction amount for affected amounts.Yes
withdrawal.taxesobjectThis area is populated based on the product configuration in Mambu.No
withdrawal.accountBalancesobjectAn object containing the account’s current balances.Yes
withdrawal.accountBalances.totalBalanceintegerThe total balance of the account.Yes
withdrawal.userKeystringThe user key of the user who was logged in and performed the action.Yes
withdrawal.termsobjectAn object containing objects that describe the terms of the withdrawal.Yes
withdrawal.terms.interestSettingsobjectThis area is populated based on the product configuration in Mambu.No
withdrawal.terms.overdraftInterestSettingsobjectThis area is populated based on the product configuration in Mambu.No
withdrawal.terms.overdraftSettingsobjectThis area is populated based on the product configuration in Mambu.No
withdrawal.transactionDetailsobjectAn object containing the transaction details.Yes
withdrawal.transactionDetails.transactionChannelKeystringThe transaction channel’s encoded key used for the transactions.Yes
withdrawal.transactionDetails.transactionChannelIdstringThe transaction channel ID used for the transaction.Yes
withdrawal.transferDetailsobjectThis area is populated based on the product configuration in Mambu.Yes
withdrawal.feesarrayAn array containing the fees charged for withdrawal.Yes

If the trusted prefunded bulk limit is reached when funding the Wise transfer - meaning funds cannot be transferred - a notification is sent, and the flow continues with making a deposit. For any other error, a refund is made and the flow is stopped. If making a deposit fails, a notification is sent and a refund must be made manually.

EntryPoint_PREFUND_Wise_transfer_flow

Settlement

The settlement flow is only for prefunded bulk transfers. The 6. [EntryPoint] Settlement [ONLY FOR PRE-FUND BULK] process handles this flow. The steps of the settlement flow are:

  1. Validate the received currency.
  2. Get deposits for settlement from the settlement account.
  3. Create settlement lists for configured currencies.
  4. Perform settlement with Wise for the received currency.
  5. Patch settled transactions with the settlementReference value.
  6. Mark transactions as settled in Mambu.

Settlement

Process payload

{
    "currencyToSettle": "EUR",
    "offset": "0",
    "limit": "300"
}
ParameterTypeDescriptionRequired
currencyToSettlestringThe three letter currency code for the currency to settle. Clients can have multiple settlement agreements for different currencies in the ForPrefund bulk transfer option.Yes
offsetstringThe index of the list to start searching at when retrieving elements, used in combination with limit to paginate results.Yes
limitstringThe maximum number of records retrieved. If the offset and limit parameters are not sent, the default limit of 50 items will be displayed. The number of elements to retrieve, used in combination with offset to paginate resultsYes

Subscribing to transfer status updates at the transaction level

The transfer updates subscription is done as part of the connector configuration. The scope of the subscription is to receive Wise transfer status updates in MPO. The process responsible for capturing the transfer status webhooks is Update Transfer Status Event Receiver . The status of the Wise transfer is patched at the withdrawal transaction level in Mambu, in the transferStatusField field, based on the Wise transferId saved as part of the transfer process.