{
"ScaContext": "USER_PRESENT",
"DisplayName": "John Doe EUR DE account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "EUR",
"Country": "DE",
"Tag": "Created using the Mangopay API Postman collection",
"RecipientScope": "PAYOUT",
"IndividualRecipient": {
"FirstName": "John",
"LastName": "Doe",
"Address": {
"AddressLine1": "Oranienburger Str. 87",
"City": "Berlin",
"PostalCode": "10178",
"Country": "DE"
}
},
"LocalBankTransfer": {
"EUR": {
"IBAN": "DE75512108001245126199"
}
}
}
{
"ScaContext": "USER_PRESENT",
"DisplayName": "Alex Smith EUR IBAN account",
"Tag": "Created using the Mangopay API Postman collection",
"PayoutMethodType": "InternationalBankTransfer",
"Currency": "EUR",
"Country": "FR",
"RecipientType": "Business",
"BusinessRecipient": {
"BusinessName": "Alex Smith Consulting",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
}
},
"InternationalBankTransfer": {
"AccountNumber": "FR7630004000031234567890143"
}
}
{
"DisplayName": "Alex Smith GBP local pay-in account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "GBP",
"Tag": "Created using the Mangopay API Postman collection",
"RecipientScope": "PAYIN",
"IndividualRecipient": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "10 Kingsway",
"City": "London",
"PostalCode": "WC2B 6LH",
"Country": "GB"
}
},
"LocalBankTransfer": {
"GBP": {
"SortCode": "200000",
"AccountNumber": "55779911"
}
}
}
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-mangopay-client-id'
client.client_apiKey = 'your-mangopay-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def createRecipient(recipient)
begin
response = MangoPay::Recipient.create(recipient, 'user_m_01JYEJ86451TKDK9BZAXRT4RTS')
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to create Recipient: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myRecipient = {
DisplayName: 'Alex Smith GBP account',
PayoutMethodType: 'LocalBankTransfer',
RecipientType: 'Individual',
Currency: 'GBP',
Country: 'GB',
IndividualRecipient: {
FirstName: 'Alex',
LastName: 'Smith',
Address: {
AddressLine1: '10 Kingsway',
City: 'London',
PostalCode: 'WC2B 6LH',
Country: 'GB'
}
},
LocalBankTransfer: {
GBP: {
SortCode: '200000',
AccountNumber: '55779911'
}
}
}
createRecipient(myRecipient)
using MangoPay.SDK;
using MangoPay.SDK.Core.Enumerations;
using MangoPay.SDK.Entities;
using MangoPay.SDK.Entities.GET;
using Newtonsoft.Json;
namespace ConsoleApp1.Recipient;
public class CreateRecipient
{
public void Run()
{
Task.Run(async () =>
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-mangopay-client-id";
api.Config.ClientPassword = "your-mangopay-api-key";
RecipientPostDTO postDto = new RecipientPostDTO();
Dictionary<string, object> localBankTransfer = new Dictionary<string, object>();
Dictionary<string, object> gbpDetails = new Dictionary<string, object>();
gbpDetails.Add("SortCode", "010039");
gbpDetails.Add("AccountNumber", "11696419");
localBankTransfer.Add(CurrencyIso.GBP.ToString(), gbpDetails);
postDto.DisplayName = "Display name";
postDto.PayoutMethodType = "LocalBankTransfer";
postDto.RecipientType = "Individual";
postDto.Currency = CurrencyIso.GBP;
postDto.IndividualRecipient = new IndividualRecipient()
{
FirstName = "Alex",
LastName = "Smith",
Address = new Address
{
AddressLine1 = "10 Kingsway",
City = "London",
PostalCode = "WC2B 6LH",
Country = CountryIso.GB
}
};
postDto.LocalBankTransfer = localBankTransfer;
postDto.Country = CountryIso.GB;
var createdRecipient = await api.Recipients.CreateAsync(postDto, "user_m_01K8AZGCCWGE9AA7J2M7ZE0SQ5");
string prettyPrint = JsonConvert.SerializeObject(createdRecipient, Formatting.Indented);
Console.WriteLine(prettyPrint);
}).GetAwaiter().GetResult();
}
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\CurrencyIso;
use MangoPay\IndividualRecipient;
use MangoPay\Libraries\Exception as MGPException;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\MangoPayApi;
use MangoPay\Recipient;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$localBankTransfer = [];
$gbpDetails = [];
$gbpDetails["SortCode"] = "010039";
$gbpDetails["AccountNumber"] = "11696419";
$localBankTransfer["GBP"] = $gbpDetails;
$address = new \MangoPay\Address();
$address->AddressLine1 = '10 Kingsway';
$address->City = 'London';
$address->Country = 'GB';
$address->PostalCode = 'WC2B 6LH';
$individualRecipient = new IndividualRecipient();
$individualRecipient->FirstName = "Alex";
$individualRecipient->LastName = "Smith";
$individualRecipient->Address = $address;
$recipient = new Recipient();
$recipient->DisplayName = "Alex Smith GBP account";
$recipient->PayoutMethodType = "LocalBankTransfer";
$recipient->RecipientType = "Individual";
$recipient->Currency = CurrencyIso::GBP;
$recipient->IndividualRecipient = $individualRecipient;
$recipient->LocalBankTransfer = $localBankTransfer;
$recipient->Country = "GB";
$response = $api->Recipients->Create($recipient, 'user_m_01K894KCN9MKGAJDCCDGQ7RSQX');
print_r($response);
} catch (MGPResponseException $e) {
print_r($e);
} catch (MGPException $e) {
print_r($e);
}
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import (Recipient, NaturalUserSca)
from mangopay.utils import Address, IndividualRecipient
recipient = Recipient()
recipient.display_name = 'Alex Smith GBP account'
recipient.payout_method_type = 'LocalBankTransfer'
recipient.recipient_type = 'Individual'
recipient.currency = 'GBP'
recipient.country = 'GB'
individual_recipient = IndividualRecipient()
individual_recipient.first_name = 'Alex'
individual_recipient.last_name = 'Smith'
individual_recipient.address = Address(address_line_1='AddressLine1', address_line_2='AddressLine2',
city='City', region='Region',
postal_code='11222', country='FR')
recipient.individual_recipient = individual_recipient
recipient.local_bank_transfer = {
'GBP': {
'SortCode': '200000',
'AccountNumber': '55779911'
}
}
natural_user = NaturalUserSca.get('user_m_01K884VNR86ZHV9RA6G602AXZW')
response = recipient.create(natural_user.id)
pprint(response)
'''
{
"ScaContext": "USER_PRESENT",
"Id": "rec_01K6D2J3683015F5D3M81JEXRH",
"Status": "PENDING",
"CreationDate": 1759228005,
"DisplayName": "John Doe EUR DE account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "EUR",
"Country": "DE",
"UserId": "user_m_01K5Y4XQA9HESYF8S9V70K16XH",
"RecipientScope": "PAYOUT",
"Tag": "Created using the Mangopay API Postman collection",
"IndividualRecipient": {
"FirstName": "John",
"LastName": "Doe",
"Address": {
"AddressLine1": "Oranienburger Str. 87",
"City": "Berlin",
"PostalCode": "10178",
"Country": "DE"
}
},
"LocalBankTransfer": {
"EUR": {
"IBAN": "DE75512108001245126199",
"BIC": "SOGEDEFFXXX"
}
},
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=sca_01999a290f06700b992580d3450609a0"
},
"RecipientVerificationOfPayee": {
"RecipientVerificationId": "46fa0ccc-6cb0-4874-95ba-9edbc6cf7904",
"RecipientVerificationCheck": "MATCH",
"RecipientVerificationMessage": "Account name fully matches account identifier."
}
}
{
"ScaContext": "USER_PRESENT",
"Id": "rec_01JRADYFJYPFM10XPQ8VFWW947",
"Status": "PENDING",
"CreationDate": 1744106896,
"DisplayName": "Alex Smith EUR international payout account",
"PayoutMethodType": "InternationalBankTransfer",
"RecipientType": "Business",
"Currency": "EUR",
"Country": "FR",
"UserId": "user_m_01JRADX7YD0060N5VAA0XPMM54",
"RecipientScope": "PAYOUT",
"Tag": "Created using the Mangopay API Postman collection",
"BusinessRecipient": {
"BusinessName": "Alex Smith Consulting",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
}
},
"InternationalBankTransfer": {
"AccountNumber": "FR7630004000031234567890143",
"BIC": "BNPAFRPPXXX"
},
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=sca_019614df3f3b7b08847111a76d9f9924"
}
}
{
"Id": "rec_01JRADRZMVZ12VXYV1A3DDX6JM",
"Status": "PENDING",
"CreationDate": 1744106716,
"DisplayName": "Alex Smith GBP local pay-in account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "GBP",
"Country": "GB",
"UserId": "user_m_01JRADQMWEKV9X7C683MYQMQCN",
"RecipientScope": "PAYIN",
"Tag": "Created using the Mangopay API Postman collection",
"IndividualRecipient": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "10 Kingsway",
"City": "London",
"PostalCode": "WC2B 6LH",
"Country": "GB"
}
},
"LocalBankTransfer": {
"GBP": {
"SortCode": "200000",
"AccountNumber": "55779911"
}
}
}
Recipients
Create a Recipient
Register a bank account for local or international payouts
POST
/
v2.01
/
{ClientId}
/
users
/
{UserId}
/
recipients
{
"ScaContext": "USER_PRESENT",
"DisplayName": "John Doe EUR DE account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "EUR",
"Country": "DE",
"Tag": "Created using the Mangopay API Postman collection",
"RecipientScope": "PAYOUT",
"IndividualRecipient": {
"FirstName": "John",
"LastName": "Doe",
"Address": {
"AddressLine1": "Oranienburger Str. 87",
"City": "Berlin",
"PostalCode": "10178",
"Country": "DE"
}
},
"LocalBankTransfer": {
"EUR": {
"IBAN": "DE75512108001245126199"
}
}
}
{
"ScaContext": "USER_PRESENT",
"DisplayName": "Alex Smith EUR IBAN account",
"Tag": "Created using the Mangopay API Postman collection",
"PayoutMethodType": "InternationalBankTransfer",
"Currency": "EUR",
"Country": "FR",
"RecipientType": "Business",
"BusinessRecipient": {
"BusinessName": "Alex Smith Consulting",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
}
},
"InternationalBankTransfer": {
"AccountNumber": "FR7630004000031234567890143"
}
}
{
"DisplayName": "Alex Smith GBP local pay-in account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "GBP",
"Tag": "Created using the Mangopay API Postman collection",
"RecipientScope": "PAYIN",
"IndividualRecipient": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "10 Kingsway",
"City": "London",
"PostalCode": "WC2B 6LH",
"Country": "GB"
}
},
"LocalBankTransfer": {
"GBP": {
"SortCode": "200000",
"AccountNumber": "55779911"
}
}
}
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-mangopay-client-id'
client.client_apiKey = 'your-mangopay-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def createRecipient(recipient)
begin
response = MangoPay::Recipient.create(recipient, 'user_m_01JYEJ86451TKDK9BZAXRT4RTS')
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to create Recipient: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myRecipient = {
DisplayName: 'Alex Smith GBP account',
PayoutMethodType: 'LocalBankTransfer',
RecipientType: 'Individual',
Currency: 'GBP',
Country: 'GB',
IndividualRecipient: {
FirstName: 'Alex',
LastName: 'Smith',
Address: {
AddressLine1: '10 Kingsway',
City: 'London',
PostalCode: 'WC2B 6LH',
Country: 'GB'
}
},
LocalBankTransfer: {
GBP: {
SortCode: '200000',
AccountNumber: '55779911'
}
}
}
createRecipient(myRecipient)
using MangoPay.SDK;
using MangoPay.SDK.Core.Enumerations;
using MangoPay.SDK.Entities;
using MangoPay.SDK.Entities.GET;
using Newtonsoft.Json;
namespace ConsoleApp1.Recipient;
public class CreateRecipient
{
public void Run()
{
Task.Run(async () =>
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-mangopay-client-id";
api.Config.ClientPassword = "your-mangopay-api-key";
RecipientPostDTO postDto = new RecipientPostDTO();
Dictionary<string, object> localBankTransfer = new Dictionary<string, object>();
Dictionary<string, object> gbpDetails = new Dictionary<string, object>();
gbpDetails.Add("SortCode", "010039");
gbpDetails.Add("AccountNumber", "11696419");
localBankTransfer.Add(CurrencyIso.GBP.ToString(), gbpDetails);
postDto.DisplayName = "Display name";
postDto.PayoutMethodType = "LocalBankTransfer";
postDto.RecipientType = "Individual";
postDto.Currency = CurrencyIso.GBP;
postDto.IndividualRecipient = new IndividualRecipient()
{
FirstName = "Alex",
LastName = "Smith",
Address = new Address
{
AddressLine1 = "10 Kingsway",
City = "London",
PostalCode = "WC2B 6LH",
Country = CountryIso.GB
}
};
postDto.LocalBankTransfer = localBankTransfer;
postDto.Country = CountryIso.GB;
var createdRecipient = await api.Recipients.CreateAsync(postDto, "user_m_01K8AZGCCWGE9AA7J2M7ZE0SQ5");
string prettyPrint = JsonConvert.SerializeObject(createdRecipient, Formatting.Indented);
Console.WriteLine(prettyPrint);
}).GetAwaiter().GetResult();
}
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\CurrencyIso;
use MangoPay\IndividualRecipient;
use MangoPay\Libraries\Exception as MGPException;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\MangoPayApi;
use MangoPay\Recipient;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$localBankTransfer = [];
$gbpDetails = [];
$gbpDetails["SortCode"] = "010039";
$gbpDetails["AccountNumber"] = "11696419";
$localBankTransfer["GBP"] = $gbpDetails;
$address = new \MangoPay\Address();
$address->AddressLine1 = '10 Kingsway';
$address->City = 'London';
$address->Country = 'GB';
$address->PostalCode = 'WC2B 6LH';
$individualRecipient = new IndividualRecipient();
$individualRecipient->FirstName = "Alex";
$individualRecipient->LastName = "Smith";
$individualRecipient->Address = $address;
$recipient = new Recipient();
$recipient->DisplayName = "Alex Smith GBP account";
$recipient->PayoutMethodType = "LocalBankTransfer";
$recipient->RecipientType = "Individual";
$recipient->Currency = CurrencyIso::GBP;
$recipient->IndividualRecipient = $individualRecipient;
$recipient->LocalBankTransfer = $localBankTransfer;
$recipient->Country = "GB";
$response = $api->Recipients->Create($recipient, 'user_m_01K894KCN9MKGAJDCCDGQ7RSQX');
print_r($response);
} catch (MGPResponseException $e) {
print_r($e);
} catch (MGPException $e) {
print_r($e);
}
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import (Recipient, NaturalUserSca)
from mangopay.utils import Address, IndividualRecipient
recipient = Recipient()
recipient.display_name = 'Alex Smith GBP account'
recipient.payout_method_type = 'LocalBankTransfer'
recipient.recipient_type = 'Individual'
recipient.currency = 'GBP'
recipient.country = 'GB'
individual_recipient = IndividualRecipient()
individual_recipient.first_name = 'Alex'
individual_recipient.last_name = 'Smith'
individual_recipient.address = Address(address_line_1='AddressLine1', address_line_2='AddressLine2',
city='City', region='Region',
postal_code='11222', country='FR')
recipient.individual_recipient = individual_recipient
recipient.local_bank_transfer = {
'GBP': {
'SortCode': '200000',
'AccountNumber': '55779911'
}
}
natural_user = NaturalUserSca.get('user_m_01K884VNR86ZHV9RA6G602AXZW')
response = recipient.create(natural_user.id)
pprint(response)
'''
{
"ScaContext": "USER_PRESENT",
"Id": "rec_01K6D2J3683015F5D3M81JEXRH",
"Status": "PENDING",
"CreationDate": 1759228005,
"DisplayName": "John Doe EUR DE account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "EUR",
"Country": "DE",
"UserId": "user_m_01K5Y4XQA9HESYF8S9V70K16XH",
"RecipientScope": "PAYOUT",
"Tag": "Created using the Mangopay API Postman collection",
"IndividualRecipient": {
"FirstName": "John",
"LastName": "Doe",
"Address": {
"AddressLine1": "Oranienburger Str. 87",
"City": "Berlin",
"PostalCode": "10178",
"Country": "DE"
}
},
"LocalBankTransfer": {
"EUR": {
"IBAN": "DE75512108001245126199",
"BIC": "SOGEDEFFXXX"
}
},
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=sca_01999a290f06700b992580d3450609a0"
},
"RecipientVerificationOfPayee": {
"RecipientVerificationId": "46fa0ccc-6cb0-4874-95ba-9edbc6cf7904",
"RecipientVerificationCheck": "MATCH",
"RecipientVerificationMessage": "Account name fully matches account identifier."
}
}
{
"ScaContext": "USER_PRESENT",
"Id": "rec_01JRADYFJYPFM10XPQ8VFWW947",
"Status": "PENDING",
"CreationDate": 1744106896,
"DisplayName": "Alex Smith EUR international payout account",
"PayoutMethodType": "InternationalBankTransfer",
"RecipientType": "Business",
"Currency": "EUR",
"Country": "FR",
"UserId": "user_m_01JRADX7YD0060N5VAA0XPMM54",
"RecipientScope": "PAYOUT",
"Tag": "Created using the Mangopay API Postman collection",
"BusinessRecipient": {
"BusinessName": "Alex Smith Consulting",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
}
},
"InternationalBankTransfer": {
"AccountNumber": "FR7630004000031234567890143",
"BIC": "BNPAFRPPXXX"
},
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=sca_019614df3f3b7b08847111a76d9f9924"
}
}
{
"Id": "rec_01JRADRZMVZ12VXYV1A3DDX6JM",
"Status": "PENDING",
"CreationDate": 1744106716,
"DisplayName": "Alex Smith GBP local pay-in account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "GBP",
"Country": "GB",
"UserId": "user_m_01JRADQMWEKV9X7C683MYQMQCN",
"RecipientScope": "PAYIN",
"Tag": "Created using the Mangopay API Postman collection",
"IndividualRecipient": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "10 Kingsway",
"City": "London",
"PostalCode": "WC2B 6LH",
"Country": "GB"
}
},
"LocalBankTransfer": {
"GBP": {
"SortCode": "200000",
"AccountNumber": "55779911"
}
}
}
Caution – Fetch schema and validate data before creationBefore using this endpoint to register a Recipient for a user, for the given currency, payout method, and recipient type combination, always:
- Fetch the schema dynamically using GET View the schema for a Recipient
- Check that the user’s data is valid using POST Validate data for a Recipient
Note – SCA triggered by this endpointRegistering a bank account as a Recipient always requires the user to authenticate using SCA on a Mangopay-hosted webpage, unless your platform is using a proxy and user consent.To let the user complete the SCA session, your platform needs to retrieve the returned
PendingUserAction.RedirectUrl, add an encoded returnUrl query parameter, and redirect the user. Read more about how to redirect them in the SCA session guide.If SCA is not successfully completed, the Recipient Status becomes CANCELED and you need to create a new Recipient to try again.In Sandbox, you can bypass SCA by including the word accept in the Email value of the Natural User or the LegalRepresentative.Email value of the Legal User – for example accept@example.com or john.doe+accept@example.com.Status as PENDING regardless of whether SCA is required (because RecipientScope is OWNER) or not. In all cases, your integration should rely on the RECIPIENT_ACTIVE webhook to know when the recipient is ACTIVE.
Verification of Payee (VOP) impacts SEPA local schemes, which means Recipients with Currency value EUR and PayoutMethod value LocalBankTransfer. Read more →
Path parameters
string
required
The unique identifier of the user.
Body parameters
string
Possible values:
USER_PRESENT, USER_NOT_PRESENTDefault value: USER_PRESENTThe SCA context of the request, which is required if the user’s UserCategory is OWNER:USER_PRESENT– The user is taking the SCA-triggering action of registering an external account as a Recipient. The platform must redirect the user using thePendingUserAction.RedirectUrlreturned so that the user can complete the SCA session.USER_NOT_PRESENT– The platform is taking the action under proxy from the user and the user has previously given consent to Mangopay (via the SCA hosted experience) to allow the action. If the user has not given (or has revoked) their consent, thenUSER_NOT_PRESENTreturns a 403 error.
ScaContext is not returned in the API response as it does not form part of the Recipient data – it’s only related to the action being performed to register the account.string
required
Length: 1–50; cannot contain:
&,'/ (pattern:^(?!.*[&,'/]).{1,50}$)A user-friendly name to identify the account. This value cannot be changed once the recipient is created.string
required
Possible values:
InternationalBankTransfer, LocalBankTransferThe payout method of the recipient:InternationalBankTransfer– The account can receive non-local currencies via SWIFT or else uses local rails for local currencies by default.LocalBankTransfer– The account can only receive the corresponding localCurrencyfor theCountry(e.g.EURto a SEPA country,GBPto a UK account,PLNto a Polish IBAN, etc.)
string
required
Possible values:
Individual, BusinessThe recipient type:Individual– An account held by a natural person, requiring theIndividualRecipientproperty.Business– An account held by a legal entity, requiring theBusinessRecipientproperty.
string
required
Possible values:
AED, AUD, CAD, CHF, CNH, CZK, DKK, EUR, GBP, HKD, HUF, ILS, JPY, MXN, NOK, NZD, PLN, RON, SAR, SEK, SGD, TRY, USD, ZARThe currency of the recipient.string
required
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The destination country of the payout method.
string
Possible values:
PAYIN, PAYOUTDefault value: PAYOUTThe scope of the recipient:PAYOUT– Usable for payouts and in pay-in use cases. APAYOUTrecipient can only be created by a user with theUserCategoryOWNERand requires SCA. You need to use the returnedPendingUserAction.RedirectUrlvalue, adding your encodedreturnUrlas a query parameter, to redirect the user to the hosted SCA session so they can complete the necessary steps.PAYIN- Not usable for payouts but only usable for pay-in use cases, such as direct debit and refunds using payouts. APAYINrecipient can be created by a user with theUserCategoryPAYERorOWNER, and does not require SCA.
string
Max. length: 255 (pattern:
^.{0,255}$)Custom data that you can add to this object. This value cannot be changed once the recipient is created.- Individual
- Business
object
required
The account holder if the
RecipientType is Individual.Only one of IndividualRecipient or BusinessRecipient is required.Show properties
Show properties
string
required
Length: 1–255; cannot contain:
()&,.:_/ (Pattern: ^(?!.*[()&,.:_/]).{1,255}$)The first name of the individual account holder.string
required
Length: 1–255; cannot contain:
()&,.:_/ (Pattern: ^(?!.*[()&,.:_/]).{1,255}$)The last name of the individual account holder.object
required
Information about the address.
Show properties
Show properties
string
required
Length: 1–255; cannot contain:
()/ (Pattern: ^(?!.*[()/]).{1,255}$)The first line of the address.string
Length: 1–255; cannot contain:
()/ (Pattern: ^(?!.*[()/]).{1,255}$)The second line of the address.string
required
Length: 1-80; cannot contain:
&,.:_' (pattern: ^(?!.*[&,.:_]).{1,80}$)The city of the address.string
Length: 1–10; cannot contain:
&,.:_'-/ (pattern: ^(?!.*[&,.:_/]).{1,50}$)The region of the address.string
required
Length: 1–10; cannot contain:
()&,.:_'/ (pattern: ^(?!.*[()&,.:_'/]).{1,10}$)The postal code of the address.string
required
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country of the address.
object
required
The account holder if the
RecipientType is Business.Only one of IndividualRecipient or BusinessRecipient is required.Show properties
Show properties
string
required
Length: 1–255; cannot contain:
(),.:/ (Pattern: ^(?!.*[(),.:/]).{1,255}$)The name of the business account holder.object
required
Information about the address.
Show properties
Show properties
string
required
Length: 1–255; cannot contain:
()/ (Pattern: ^(?!.*[()/]).{1,255}$)The first line of the address.string
Length: 1–255; cannot contain:
()/ (Pattern: ^(?!.*[()/]).{1,255}$)The second line of the address.string
required
Length: 1-80; cannot contain:
&,.:_' (pattern: ^(?!.*[&,.:_]).{1,80}$)The city of the address.string
Length: 1–10; cannot contain:
&,.:_'-/ (pattern: ^(?!.*[&,.:_/]).{1,50}$)The region of the address.string
required
Length: 1–10; cannot contain:
()&,.:_'/ (pattern: ^(?!.*[()&,.:_'/]).{1,10}$)The postal code of the address.string
required
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country of the address.
- InternationalBankTransfer
- LocalBankTransfer
object
required
The account details if
PayoutMethodType is InternationalBankTransfer.Only one of InternationalBankTransfer or LocalBankTransfer is required.The InternationalBankTransfer depends on the Currency and Country.Hide properties
Hide properties
string
required
Format: The format returned by the schema endpoint depending on the
Currency and CountryThe account number of the account. For IBAN countries, the AccountNumber format is the local IBAN one. For other countries, the format depends on the Country and should be retrieved from the GET View the schema for a Recipient endpoint.string
Format: The format returned by the schema endpoint depending on the
Currency and CountryThe BIC of the account.For countries that don’t use IBAN, the BIC is required. For countries that use IBAN, this field is ignored because the BIC generated automatically from the IBAN and returned in the response.object
required
The account details if
PayoutMethodType is LocalBankTransfer, depending on the Currency.One of:- CAD
- CHF
- CZK
- DKK
- EUR
- GBP
- HUF
- NOK
- PLN
- RON
- SEK
- USD
object
required
Hide properties
Hide properties
string
required
Format: 7–35 digits (pattern:
^\\d{7,35}$)The account number of the Canadian account.string
required
Format: 3 digits (pattern:
^\\d{3}$)The institution number of the Canadian account.string
required
Format: 5 digits (pattern:
^\\d{5}$)The branch code of the Canadian account.string
required
Length: 1–50The bank name of the Canadian account.
object
required
Hide properties
Hide properties
string
required
Format: 8–12 alphanumeric characters (pattern:
^[0-9a-zA-Z]{8,12}$)The account number of the US account.string
required
Format: 9 digits (pattern:
^\\d{9}$)The ABA routing number of the US account.string
Format: 8-12 digits then
FFC then a space then a sting of characters up to 140 total length (pattern: ^(?=.{0,140}$)[0-9]{8,12}/FFC [0-9a-zA-Z/\\-?:().,'+ ]+$)FFC transfer information for the US account.Responses
201
201
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
string
Possible values:
PENDING, CANCELED, ACTIVE, DEACTIVATEDThe status of the recipient:PENDING– ForPAYOUTscope recipients, the user must complete SCA before the recipient can becomeACTIVE. ForPAYINscope recipients, the recipient creation is in progress.CANCELED– SCA was not successfully completed and the recipient creation request was canceled. To retry, create another recipient to retrieve anotherPendingUserAction.RedirectUrl. TheCANCELEDstatus does not apply ifRecipientScopeisPAYIN.ACTIVE– Recipient creation was successful (including SCA ifRecipientScopeisPAYOUT) and the recipient is ready to be used for payouts .DEACTIVATED– The recipient has been permanently deactivated and can no longer be used.
Unix timestamp
The date and time at which the object was created.
string
Length: 1–50; cannot contain:
&,'/ (pattern:^(?!.*[&,'/]).{1,50}$)A user-friendly name to identify the account. This value cannot be changed once the recipient is created.string
Possible values:
InternationalBankTransfer, LocalBankTransferThe payout method of the recipient:LocalBankTransfer– The account can only receive the corresponding localCurrencyfor theCountryvia the domestic payment rail (e.g.EURvia a SEPA local scheme to a SEPA country,GBPvia FPS to aGBaccount,USDvia ACH to aUSaccount, etc). Payouts in non-local currencies return an error.InternationalBankTransfer– The account can receive both non-local currencies via SWIFT and also local currency via domestic rails.
string
Possible values:
Individual, BusinessThe recipient type:Individual– An account held by a natural person, requiring theIndividualRecipientproperty.Business– An account held by a legal entity, requiring theBusinessRecipientproperty.
string
Possible values:
AED, AUD, CAD, CHF, CNH, CZK, DKK, EUR, GBP, HKD, HUF, ILS, JPY, MXN, NOK, NZD, PLN, RON, SAR, SEK, SGD, TRY, USD, ZARThe currency of the recipient.string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The destination country of the payout method.
string
The unique identifier of the user.
string
Possible values:
PAYIN, PAYOUTDefault value: PAYOUTThe scope of the recipient:PAYOUT– Usable for payouts and in pay-in use cases. APAYOUTrecipient can only be created by a user with theUserCategoryOWNERand requires SCA. You need to use the returnedPendingUserAction.RedirectUrlvalue, adding your encodedreturnUrlas a query parameter, to redirect the user to the hosted SCA session so they can complete the necessary steps.PAYIN- Not usable for payouts but only usable for pay-in use cases, such as direct debit and refunds using payouts. APAYINrecipient can be created by a user with theUserCategoryPAYERorOWNER, and does not require SCA.
PAYIN and PAYOUT scopes can be created for either InternationalBankTransfer or LocalBankTransfer, and for either IndividualRecipient or BusinessRecipient, and for any Currency.string
Max. length: 255 (pattern:
^.{0,255}$)Custom data that you can add to this object. This value cannot be changed once the recipient is created.string
The unique identifier of the user.
string
Possible values:
PAYIN, PAYOUTDefault value: PAYOUTThe scope of the recipient:PAYOUT– Usable for payouts and in pay-in use cases. APAYOUTrecipient can only be created by a user with theUserCategoryOWNERand requires SCA. You need to use the returnedPendingUserAction.RedirectUrlvalue, adding your encodedreturnUrlas a query parameter, to redirect the user to the hosted SCA session so they can complete the necessary steps.PAYIN- Not usable for payouts but only usable for pay-in use cases, such as direct debit and refunds using payouts. APAYINrecipient can be created by a user with theUserCategoryPAYERorOWNER, and does not require SCA.
PAYIN and PAYOUT scopes can be created for either InternationalBankTransfer or LocalBankTransfer, and for either IndividualRecipient or BusinessRecipient, and for any Currency.string
Max. length: 255 (pattern:
^.{0,255}$)Custom data that you can add to this object. This value cannot be changed once the recipient is created.- Individual
- Business
object
The account holder if the
RecipientType is Individual.Show properties
Show properties
string
Length: 1–255; cannot contain:
()&,.:_/ (Pattern: ^(?!.*[()&,.:_/]).{1,255}$)The first name of the individual account holder.string
Length: 1–255; cannot contain:
()&,.:_/ (Pattern: ^(?!.*[()&,.:_/]).{1,255}$)The last name of the individual account holder.object
Information about the address.
Show properties
Show properties
string
Length: 1–255; cannot contain:
()/ (Pattern: ^(?!.*[()/]).{1,255}$)The first line of the address.string
Length: 1–255; cannot contain:
()/ (Pattern: ^(?!.*[()/]).{1,255}$)The second line of the address. Parameter only returned if sent.string
Length: 1-80; cannot contain:
&,.:_' (pattern: ^(?!.*[&,.:_]).{1,80}$)The city of the address.string
Length: 1–10; cannot contain:
&,.:_'-/ (pattern: ^(?!.*[&,.:_/]).{1,50}$)The region of the address. Parameter only returned if sent.string
Length: 1–10; cannot contain:
()&,.:_'/ (pattern: ^(?!.*[()&,.:_'/]).{1,10}$)The postal code of the address.string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country of the address.
object
The account holder if the
RecipientType is Business.Show properties
Show properties
string
Length: 1–255; cannot contain:
(),.:/ (Pattern: ^(?!.*[(),.:/]).{1,255}$)The name of the business account holder.object
Information about the address.
Show properties
Show properties
string
Length: 1–255; cannot contain:
()/ (Pattern: ^(?!.*[()/]).{1,255}$)The first line of the address.string
Length: 1–255; cannot contain:
()/ (Pattern: ^(?!.*[()/]).{1,255}$)The second line of the address. Parameter only returned if sent.string
Length: 1-80; cannot contain:
&,.:_' (pattern: ^(?!.*[&,.:_]).{1,80}$)The city of the address.string
Length: 1–10; cannot contain:
&,.:_'-/ (pattern: ^(?!.*[&,.:_/]).{1,50}$)The region of the address. Parameter only returned if sent.string
Length: 1–10; cannot contain:
()&,.:_'/ (pattern: ^(?!.*[()&,.:_'/]).{1,10}$)The postal code of the address.string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country of the address.
- InternationalBankTransfer
- LocalBankTransfer
object
The account details if
PayoutMethodType is LocalBankTransfer, depending on the Currency. One of:- CAD
- CHF
- CZK
- DKK
- EUR
- GBP
- HUF
- NOK
- PLN
- RON
- SEK
- USD
object
Hide properties
Hide properties
string
Format: 7–35 digits (pattern:
^\\d{7,35}$)The account number of the Canadian account.string
Format: 3 digits (pattern:
^\\d{3}$)The institution number of the Canadian account.string
Format: 5 digits (pattern:
^\\d{5}$)The branch code of the Canadian account.string
Length: 1–50The bank name of the Canadian account.
object
Hide properties
Hide properties
string
Format: 8–12 alphanumeric characters (pattern:
^[0-9a-zA-Z]{8,12}$)The account number of the US account.string
Format: 9 digits (pattern:
^\\d{9}$)The ABA routing number of the US account.string
Format: 8-12 digits then
FFC then a space then a sting of characters up to 140 total length (pattern: ^(?=.{0,140}$)[0-9]{8,12}/FFC [0-9a-zA-Z/\\-?:().,'+ ]+$)FFC transfer information for the US account.object
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned
null).Hide properties
Hide properties
string
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.The SCA session link expires 10 minutes after it’s generated.Caution: Before redirecting the user on this URL, you must add the query parameter
ReturnUrl with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).For more details, see How to redirect a user for an SCA session.object
Information about the Verification of Payee (VOP) check performed on the Recipient. Because VOP only applies to SEPA local schemes, this object is returned
null if the Recipient’s Currency is not EUR or its PayoutMethod is not LocalBankTransfer.Show child attributes
Show child attributes
string
The unique identifier of the VOP check. This value may be
null if the check could not be performed.string
Possible values:
MATCH, CLOSE_MATCH, NO_MATCH, MATCH_NOT_POSSIBLEThe result of the VOP check:MATCH– The account is valid and the account name matches the IBAN.CLOSE_MATCH– The account is valid but the name doesn’t match exactly.NO_MATCH– This account likely belongs to a different owner.MATCH_NOT_POSSIBLE– The check could not be completed.
string
The explanation of the
RecipientVerificationCheck:- If
MATCH, thenAccount name fully matches account identifier. - If
CLOSE_MATCH, thenAccount name partially matches account identifier. Name returned by check: {Name}. Payment made to this account may not reach its intended counterparty. - If
NO_MATCH, thenAccount name does not matches account identifier. Payment made to this account may not reach its intended counterparty. - If
MATCH_NOT_POSSIBLE, thenAccount name does not matches account identifier. Payment made to this account may not reach its intended counterparty.
string
The name returned by the check in case of a
CLOSE_MATCH result, which can be used to re-register the Recipient. This property is not returned on the check performed on a Payout request, even if the result is CLOSE_MATCH.400 - Parameter or data errors
400 - Parameter or data errors
Example 400 error:The following
{
"Id": "1a8bff3c-37a4-4a1a-9219-d00a5fd19865",
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Date": 1779197001,
"Errors": {
"IndividualRecipient.Address.PostalCode": "LENGTH_MORE_THAN_MAX",
"LocalBankTransfer.GBP.AccountNumber": "INVALID_FORMAT. Regex validation: ^\\d{8}$",
"LocalBankTransfer.GBP.SortCode": "INVALID_FORMAT. Regex validation: ^\\d{6}$"
}
}
Errors values may be returned for a given parameter:REQUIRED– Value is required but not present in the request.LENGTH_MORE_THAN_MAX– String length is greater than required length.LENGTH_LESS_THAN_MIN– String length is less than required length.INVALID_FORMAT– Value doe not match expected pattern.NOT_IN_ALLOWED_VALUES– Value is not a validPayoutMethodType,RecipientType,CurrencyorCountry.UNSUPPORTED_COUNTRY– Country not allowed (see country restrictions article for details).UNSUPPORTED_CURRENCY– Currency is a valid ISO 4217 format but not yet supported for Recipients.UNSUPPORTED_PAYOUT_METHOD_FOR_CURRENCY– Payout method is not supported for theCurrencyandCountrycombination.CLIENT_NOT_FOUND–ClientIdmaking the request does not exist.USER_NOT_FOUND–UserIdfor which the request is made does not exist.INVALID_SORT_CODE– Sort code for this account is not valid.INVALID_ACCOUNT_NUMBER– Account number is not valid.INVALID_IBAN– IBAN is not valid.INVALID_BIC– BIC is not valid.IBAN_DOES_NOT_CORRESPOND_TO_ACCOUNT_COUNTRY– IBAN or account number does not match theCountryvalue (for example,CountryisGBbut the IBAN starts withFR).BIC_DOES_NOT_CORRESPOND_TO_ACCOUNT_COUNTRY– Bank identifier does not match theCountryvalue (for example,CountryisJPbut the BIC indicates US).UNSUPPORTED_IBAN– IBAN is valid but not supported:- If
LocalBankTransfer, the IBAN country is not part of SEPA and the local currency is not EUR. - If
InternationalBankTransfer, the IBAN country is not GB or is not part of SEPA and local currency is not EUR.
- If
INVALID_ACCOUNT_NUMBER_AND_SORT_CODE_COMBINATION– GB sort code and account number combination is not valid.
400 - LocalBankTransfer EUR not available because bank not part of SCT
400 - LocalBankTransfer EUR not available because bank not part of SCT
{
"Id": "ac382a41-5c6f-47fb-8ef4-5fcf43ae1c50",
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Date": 1772979930,
"Errors": {
"Reachability": "LOCAL_BANK_TRANSFER_NOT_AVAILABLE_AS_BANK_ACCOUNT_NOT_SEPA_REACHABLE"
}
}
LocalBankTransfer request in EUR if the IBAN is not reachable on SEPA Credit Transfer (SCT), particularly relevant for accounts registered in countries that operate other local schemes: CH, CZ, DK, GB, HU, NO, PL, RO, SE.400 - User is PAYER but RecipientScope set to PAYOUT
400 - User is PAYER but RecipientScope set to PAYOUT
{
"Id": "6e5f4718-7e68-4348-9967-84645261007f",
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Date": 1762350143,
"Errors": {
"SCA": "2815488948686553431"
}
}
RecipientScope is set to PAYOUT but the user’s UserCategory is PAYER. A user must be an OWNER to register a Recipient that can be used for payouts.400 - Legal User is missing LegalRepresentative.Email
400 - Legal User is missing LegalRepresentative.Email
{
"Id": "b8c130e9-1e18-4c67-80e6-a968a015608c",
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Date": 1762356390,
"Errors": {
"SCA": "KAR_0042"
}
}
LegalRepresentative.Email, which is required to perform SCA. Prior to the introduction of SCA, it was possible to create a Legal User without the legal representative’s email.401 - Consent not given for proxy when USER_NOT_PRESENT sent
401 - Consent not given for proxy when USER_NOT_PRESENT sent
{
"Id": "729e9ad7-d4d2-453c-8e7a-6863117a3945",
"Message": "You are not authorized to perform this action. The user has not provided consent to the requested proxy.",
"Type": "sca_proxy_consent_required",
"Date": 1763384886,
"Errors": null
}
{
"ScaContext": "USER_PRESENT",
"Id": "rec_01K6D2J3683015F5D3M81JEXRH",
"Status": "PENDING",
"CreationDate": 1759228005,
"DisplayName": "John Doe EUR DE account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "EUR",
"Country": "DE",
"UserId": "user_m_01K5Y4XQA9HESYF8S9V70K16XH",
"RecipientScope": "PAYOUT",
"Tag": "Created using the Mangopay API Postman collection",
"IndividualRecipient": {
"FirstName": "John",
"LastName": "Doe",
"Address": {
"AddressLine1": "Oranienburger Str. 87",
"City": "Berlin",
"PostalCode": "10178",
"Country": "DE"
}
},
"LocalBankTransfer": {
"EUR": {
"IBAN": "DE75512108001245126199",
"BIC": "SOGEDEFFXXX"
}
},
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=sca_01999a290f06700b992580d3450609a0"
},
"RecipientVerificationOfPayee": {
"RecipientVerificationId": "46fa0ccc-6cb0-4874-95ba-9edbc6cf7904",
"RecipientVerificationCheck": "MATCH",
"RecipientVerificationMessage": "Account name fully matches account identifier."
}
}
{
"ScaContext": "USER_PRESENT",
"Id": "rec_01JRADYFJYPFM10XPQ8VFWW947",
"Status": "PENDING",
"CreationDate": 1744106896,
"DisplayName": "Alex Smith EUR international payout account",
"PayoutMethodType": "InternationalBankTransfer",
"RecipientType": "Business",
"Currency": "EUR",
"Country": "FR",
"UserId": "user_m_01JRADX7YD0060N5VAA0XPMM54",
"RecipientScope": "PAYOUT",
"Tag": "Created using the Mangopay API Postman collection",
"BusinessRecipient": {
"BusinessName": "Alex Smith Consulting",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
}
},
"InternationalBankTransfer": {
"AccountNumber": "FR7630004000031234567890143",
"BIC": "BNPAFRPPXXX"
},
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=sca_019614df3f3b7b08847111a76d9f9924"
}
}
{
"Id": "rec_01JRADRZMVZ12VXYV1A3DDX6JM",
"Status": "PENDING",
"CreationDate": 1744106716,
"DisplayName": "Alex Smith GBP local pay-in account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "GBP",
"Country": "GB",
"UserId": "user_m_01JRADQMWEKV9X7C683MYQMQCN",
"RecipientScope": "PAYIN",
"Tag": "Created using the Mangopay API Postman collection",
"IndividualRecipient": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "10 Kingsway",
"City": "London",
"PostalCode": "WC2B 6LH",
"Country": "GB"
}
},
"LocalBankTransfer": {
"GBP": {
"SortCode": "200000",
"AccountNumber": "55779911"
}
}
}
{
"ScaContext": "USER_PRESENT",
"DisplayName": "John Doe EUR DE account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "EUR",
"Country": "DE",
"Tag": "Created using the Mangopay API Postman collection",
"RecipientScope": "PAYOUT",
"IndividualRecipient": {
"FirstName": "John",
"LastName": "Doe",
"Address": {
"AddressLine1": "Oranienburger Str. 87",
"City": "Berlin",
"PostalCode": "10178",
"Country": "DE"
}
},
"LocalBankTransfer": {
"EUR": {
"IBAN": "DE75512108001245126199"
}
}
}
{
"ScaContext": "USER_PRESENT",
"DisplayName": "Alex Smith EUR IBAN account",
"Tag": "Created using the Mangopay API Postman collection",
"PayoutMethodType": "InternationalBankTransfer",
"Currency": "EUR",
"Country": "FR",
"RecipientType": "Business",
"BusinessRecipient": {
"BusinessName": "Alex Smith Consulting",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
}
},
"InternationalBankTransfer": {
"AccountNumber": "FR7630004000031234567890143"
}
}
{
"DisplayName": "Alex Smith GBP local pay-in account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "GBP",
"Tag": "Created using the Mangopay API Postman collection",
"RecipientScope": "PAYIN",
"IndividualRecipient": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "10 Kingsway",
"City": "London",
"PostalCode": "WC2B 6LH",
"Country": "GB"
}
},
"LocalBankTransfer": {
"GBP": {
"SortCode": "200000",
"AccountNumber": "55779911"
}
}
}
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-mangopay-client-id'
client.client_apiKey = 'your-mangopay-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def createRecipient(recipient)
begin
response = MangoPay::Recipient.create(recipient, 'user_m_01JYEJ86451TKDK9BZAXRT4RTS')
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to create Recipient: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myRecipient = {
DisplayName: 'Alex Smith GBP account',
PayoutMethodType: 'LocalBankTransfer',
RecipientType: 'Individual',
Currency: 'GBP',
Country: 'GB',
IndividualRecipient: {
FirstName: 'Alex',
LastName: 'Smith',
Address: {
AddressLine1: '10 Kingsway',
City: 'London',
PostalCode: 'WC2B 6LH',
Country: 'GB'
}
},
LocalBankTransfer: {
GBP: {
SortCode: '200000',
AccountNumber: '55779911'
}
}
}
createRecipient(myRecipient)
using MangoPay.SDK;
using MangoPay.SDK.Core.Enumerations;
using MangoPay.SDK.Entities;
using MangoPay.SDK.Entities.GET;
using Newtonsoft.Json;
namespace ConsoleApp1.Recipient;
public class CreateRecipient
{
public void Run()
{
Task.Run(async () =>
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-mangopay-client-id";
api.Config.ClientPassword = "your-mangopay-api-key";
RecipientPostDTO postDto = new RecipientPostDTO();
Dictionary<string, object> localBankTransfer = new Dictionary<string, object>();
Dictionary<string, object> gbpDetails = new Dictionary<string, object>();
gbpDetails.Add("SortCode", "010039");
gbpDetails.Add("AccountNumber", "11696419");
localBankTransfer.Add(CurrencyIso.GBP.ToString(), gbpDetails);
postDto.DisplayName = "Display name";
postDto.PayoutMethodType = "LocalBankTransfer";
postDto.RecipientType = "Individual";
postDto.Currency = CurrencyIso.GBP;
postDto.IndividualRecipient = new IndividualRecipient()
{
FirstName = "Alex",
LastName = "Smith",
Address = new Address
{
AddressLine1 = "10 Kingsway",
City = "London",
PostalCode = "WC2B 6LH",
Country = CountryIso.GB
}
};
postDto.LocalBankTransfer = localBankTransfer;
postDto.Country = CountryIso.GB;
var createdRecipient = await api.Recipients.CreateAsync(postDto, "user_m_01K8AZGCCWGE9AA7J2M7ZE0SQ5");
string prettyPrint = JsonConvert.SerializeObject(createdRecipient, Formatting.Indented);
Console.WriteLine(prettyPrint);
}).GetAwaiter().GetResult();
}
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\CurrencyIso;
use MangoPay\IndividualRecipient;
use MangoPay\Libraries\Exception as MGPException;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\MangoPayApi;
use MangoPay\Recipient;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$localBankTransfer = [];
$gbpDetails = [];
$gbpDetails["SortCode"] = "010039";
$gbpDetails["AccountNumber"] = "11696419";
$localBankTransfer["GBP"] = $gbpDetails;
$address = new \MangoPay\Address();
$address->AddressLine1 = '10 Kingsway';
$address->City = 'London';
$address->Country = 'GB';
$address->PostalCode = 'WC2B 6LH';
$individualRecipient = new IndividualRecipient();
$individualRecipient->FirstName = "Alex";
$individualRecipient->LastName = "Smith";
$individualRecipient->Address = $address;
$recipient = new Recipient();
$recipient->DisplayName = "Alex Smith GBP account";
$recipient->PayoutMethodType = "LocalBankTransfer";
$recipient->RecipientType = "Individual";
$recipient->Currency = CurrencyIso::GBP;
$recipient->IndividualRecipient = $individualRecipient;
$recipient->LocalBankTransfer = $localBankTransfer;
$recipient->Country = "GB";
$response = $api->Recipients->Create($recipient, 'user_m_01K894KCN9MKGAJDCCDGQ7RSQX');
print_r($response);
} catch (MGPResponseException $e) {
print_r($e);
} catch (MGPException $e) {
print_r($e);
}
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import (Recipient, NaturalUserSca)
from mangopay.utils import Address, IndividualRecipient
recipient = Recipient()
recipient.display_name = 'Alex Smith GBP account'
recipient.payout_method_type = 'LocalBankTransfer'
recipient.recipient_type = 'Individual'
recipient.currency = 'GBP'
recipient.country = 'GB'
individual_recipient = IndividualRecipient()
individual_recipient.first_name = 'Alex'
individual_recipient.last_name = 'Smith'
individual_recipient.address = Address(address_line_1='AddressLine1', address_line_2='AddressLine2',
city='City', region='Region',
postal_code='11222', country='FR')
recipient.individual_recipient = individual_recipient
recipient.local_bank_transfer = {
'GBP': {
'SortCode': '200000',
'AccountNumber': '55779911'
}
}
natural_user = NaturalUserSca.get('user_m_01K884VNR86ZHV9RA6G602AXZW')
response = recipient.create(natural_user.id)
pprint(response)
'''
Was this page helpful?