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.
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"
}
Parameter | Type | Description | Required |
---|---|---|---|
transferBody | object | An object holding details about the transfer. | Yes |
transferBody.targetAccount | integer | The account number of the targeted account. | Yes |
transferBody.customerTransactionId | string | A unique string holding the transaction ID. | Yes |
transferBody.quoteUuid | string | The quote’s unique ID. | Yes |
transferBody.details | object | An object holding the optional reference details. | No |
transferBody.details.reference | string | A refenece value for the payment details. | No |
transferBody.details.transferPurpose | string | The prurpose of the transaction. | No |
transferBody.details.sourceOfFunds | string | Where the funds for teh transaction come from. | No |
token | string | The client’s token, which is retrieved in the user creation and login process. | Yes |
language | string | The language code, which can be found in Wise’s Language Support page. | Yes |
Getting an address using ID
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"
}
Parameter | Type | Description | Required |
---|---|---|---|
addressId | string | The client’s address ID, which is retrieved in the user creation and login process. | Yes |
token | string | The 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
}
Parameter | Type | Description | Required |
---|---|---|---|
paymentRails | object | Yes | |
paymentRails.GBP | string | The payment rail of a UK Pound-denominated transfers, which usually come from the ClearBank connector. | Yes |
paymentRails.EUR | string | The process ID of a Euro-denominated transfers, which usually point to the Mambu Payment Hub rail. | Yes |
paymentRails.USD | string | The 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"
}
Parameter | Type | Description | Required |
---|---|---|---|
clientEmail | string | The client’s email address, which is used to validate the user in the Wise backend. | Yes |
debtorIBAN | string | The IBAN number of the debtor’s account. | Yes |
recipient | object | An object containing details about the recipient. | Yes |
recipient.id | string | The recipient’s ID. | Yes |
recipient.business | string | The recipient business name. | Yes |
recipient.profile | string | The recipient’s profile ID. | Yes |
recipient.accountHolderName | string | The full name attached to the recipient’s account. | Yes |
recipient.currency | string | The three letter currency code for the recipient’s account. | Yes |
recipient.country | string | The two letter country code for the country. | Yes |
recipient.type | string | The recipient’s account type. | Yes |
recipient.user | integer | The user ID of user that created or owns the recipient’s profile. | Yes |
recipient.active | boolean | A boolean value to check if the recipient’s account is active. Values can be only true or false . | Yes |
recipient.ownedByCustomer | boolean | A boolean value to check if the recipient’s account is owned by the transferer. Values can be only true or false . | Yes |
recipient.details | object | An object holding the recipient’s personal details. | Yes |
recipient.details.email | string | The recipient’s email address. | Yes |
recipient.details.legalType | string | The type of legal entity that the recipient is Private for an individual and Business for a business. | Yes |
recipient.details.IBAN | string | The recipient’s IBAN number. | Yes |
recipient.details.iban | string | The recipient’s IBAN number. | Yes |
token | string | The client’s token, which is retrieved in the user creation and login process. | Yes |
transferBody | object | An object holding details about the transfer. | Yes |
transferBody.targetAccount | integer | The account number of the targeted account. | Yes |
transferBody.customerTransactionId | string | A unique string holding the transaction ID. | Yes |
transferBody.quoteUuid | string | The quote’s unique ID. | Yes |
transferBody.details | object | An object holding the reference details. | Yes |
transferBody.details.reference | string | Contains the payment details. | Yes |
transferredAmount | integer | The transferred amount after the user requests the available quotes and transfer options. | Yes |
language | string | The 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 configuredpaymentRails
. - 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 theTWTransferID
andtransferStatusField
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.
- If the payment is accepted, where the
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.
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"
}
Parameter | Type | Description | Required |
---|---|---|---|
clientEmail | string | The client’s email address, which is used to validate the user in the Wise backend. | Yes |
depositAccountId | string | The client’s Mambu account ID. | Yes |
userDepositAccountCurrency | string | The three letter currency code of the client’s Mambu account currency. | Yes |
recipient | object | An object containing details about the recipient. | Yes |
recipient.id | string | The recipient’s ID. | Yes |
recipient.business | string | The recipient’s business name. | Yes |
recipient.profile | string | The recipient’s profile ID. | Yes |
recipient.accountHolderName | string | The full name attached to the recipient’s account. | Yes |
recipient.currency | string | The three letter currency code for the recipient’s account. | Yes |
recipient.country | string | The two letter country code for the country. | Yes |
recipient.type | string | The recipient’s account type. | Yes |
recipient.user | integer | The user ID of teh user that created or owns the recipients account. | Yes |
recipient.active | boolean | A boolean value to check if the recipient’s account is active. Values can be only true or false . | Yes |
recipient.ownedByCustomer | boolean | A boolean value to check if the recipient’s account is owned by the transferer. Values can be only true or false . | Yes |
recipient.details | object | An object holding the recipient’s personal details. | Yes |
recipient.details.email | string | The recipient’s email address. | Yes |
recipient.details.legalType | string | The type of legal entity that the recipient is Private for an individual and Business for a business. | Yes |
recipient.details.IBAN | string | The recipient’s IBAN number. | Yes |
recipient.details.iban | string | The recipient’s IBAN number. | Yes |
token | string | The client’s token, which is retrieved in the user creation and login process. | Yes |
transferBody | object | An object holding details about the transfer. | Yes |
transferBody.targetAccount | integer | The account number of the targeted account. | Yes |
transferBody.customerTransactionId | string | A unique string holding the transaction ID. | Yes |
transferBody.quoteUuid | string | The quote’s unique ID. | Yes |
transferBody.details | object | An object holding the reference details. | Yes |
transferBody.details.reference | string | Contains the payment details. | Yes |
sourceCurrency | string | The three letter currency code for the source currency of the transfer. | Yes |
language | string | The language code, which can be found in Wise’s Language Support page. | Yes |
Prefunded transfer flows
The first part of the flow involves:
- Creating the Wise transfer.
- The Mambu withdrawal with mapping to Wise custom fields:
transferId
and fields from therecipient
,transfer
, andfees
objects. - Updating the Wise
transferStatus
custom field at the withdrawal transaction level in Mambu. - 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, thetwTransferId
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, thetwTransferId
,token
,transferBody
,transferredAmount
,withdrawal
objects anddepositAccountId
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.
The second part of the flow involves:
- Funding the Wise transfer.
- 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": []
}
}
Parameter | Type | Description | Required |
---|---|---|---|
twTransferId | string | The Wise transfer ID. | Yes |
token | string | The client’s token, which is retrieved in the user creation and login process. | Yes |
transferBody | object | An object holding details about the transfer. | Yes |
transferBody.targetAccount | integer | The account number of the targeted account. | Yes |
transferBody.customerTransactionId | string | A unique string holding the transaction ID. | Yes |
transferBody.quoteUuid | string | The quote’s unique ID. | Yes |
transferredAmount | integer | The transferred amount after the user requests the available quotes and transfer options. | Yes |
depositAccountId | string | The client’s Mambu account ID. | Yes |
withdrawal | object | An object containing details about the withdrawal. | Yes |
withdrawal.encodedKey | string | A unique identifier for the withdrawal transaction. | Yes |
withdrawal.id | string | The ID of the withdrawal transaction. | Yes |
withdrawal.creationDate | string | The date when the withdrawal was made in the YYYY-MM-DD"T"HH:mm:ssTZ format. | Yes |
withdrawal.valueDate | string | The 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.bookingDate | string | The date when the booking was made in the YYYY-MM-DD"T"HH:mm:ssTZ format. | Yes |
withdrawal.parentAccountKey | string | The foreign key to the deposit account this transaction refers to. | Yes |
withdrawal.type | string | The transaction type, which in this instance will be WITHDRAWAL . | Yes |
withdrawal.amount | integer | The amount being withdrawn. | Yes |
withdrawal.currencyCode | string | The three letter currency code for the currency of the withdrawal. | Yes |
withdrawal.affectedAmounts | object | Affected amounts for a withdrawal. | Yes |
withdrawal.affectedAmounts.fundsAmount | integer | The funds amount for witdrawals. | Yes |
withdrawal.affectedAmounts.interestAmount | integer | The interest amount for affected amounts. | Yes |
withdrawal.affectedAmounts.feesAmount | integer | The fees amount for affected amounts. | Yes |
withdrawal.affectedAmounts.overdraftAmount | integer | The overdraft amount for affected amounts. | Yes |
withdrawal.affectedAmounts.overdraftFeesAmount | integer | The overdraft fee amount for affected amounts. | Yes |
withdrawal.affectedAmounts.overdraftInterestAmount | integer | The overdraft interest amount for affected amounts. | Yes |
withdrawal.affectedAmounts.technicalOverdraftAmount | integer | The technical overdraft amount for affected amounts. | Yes |
withdrawal.affectedAmounts.technicalOverdraftInterestAmount | integer | The technical overdraft interest amount for affected amounts. | Yes |
withdrawal.affectedAmounts.fractionAmount | integer | The fraction amount for affected amounts. | Yes |
withdrawal.taxes | object | This area is populated based on the product configuration in Mambu. | No |
withdrawal.accountBalances | object | An object containing the account’s current balances. | Yes |
withdrawal.accountBalances.totalBalance | integer | The total balance of the account. | Yes |
withdrawal.userKey | string | The user key of the user who was logged in and performed the action. | Yes |
withdrawal.terms | object | An object containing objects that describe the terms of the withdrawal. | Yes |
withdrawal.terms.interestSettings | object | This area is populated based on the product configuration in Mambu. | No |
withdrawal.terms.overdraftInterestSettings | object | This area is populated based on the product configuration in Mambu. | No |
withdrawal.terms.overdraftSettings | object | This area is populated based on the product configuration in Mambu. | No |
withdrawal.transactionDetails | object | An object containing the transaction details. | Yes |
withdrawal.transactionDetails.transactionChannelKey | string | The transaction channel’s encoded key used for the transactions. | Yes |
withdrawal.transactionDetails.transactionChannelId | string | The transaction channel ID used for the transaction. | Yes |
withdrawal.transferDetails | object | This area is populated based on the product configuration in Mambu. | Yes |
withdrawal.fees | array | An 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.
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:
- Validate the received currency.
- Get deposits for settlement from the settlement account.
- Create settlement lists for configured currencies.
- Perform settlement with Wise for the received currency.
- Patch settled transactions with the
settlementReference
value. - Mark transactions as settled in Mambu.
Process payload
{
"currencyToSettle": "EUR",
"offset": "0",
"limit": "300"
}
Parameter | Type | Description | Required |
---|---|---|---|
currencyToSettle | string | The 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 |
offset | string | The index of the list to start searching at when retrieving elements, used in combination with limit to paginate results. | Yes |
limit | string | The 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 results | Yes |
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.