const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
const listCountryAuthorizations = async () => {
return await mangopay.Regulatory.getAllCountriesAuthorizations()
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listCountryAuthorizations()
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def listCountryAuthorization()
begin
response = MangoPay::Regulatory.get_all_countries_authorizations()
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch country authorizations: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
listCountryAuthorization()
import java.util.List;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.Pagination;
import com.mangopay.entities.CountryAuthorization;
public class ListCountryAuthorizations {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
List<CountryAuthorization> countryAuthorizations = mangopay.getRegulatoryApi().getAllCountriesAuthorizations(new Pagination(1, 100), null);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(countryAuthorizations);
System.out.println(prettyJson);
}
}
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 CountryAuthorization
country_authorizations = CountryAuthorization.get_all_countries_authorizations()
for country_authorization in country_authorizations:
pprint(country_authorization._data)
pprint(vars(country_authorization.authorization))
print()
using MangoPay.SDK;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var countryAuthorizations = await api.Regulatory.GetAllCountriesAuthorizations();
string prettyPrint = JsonConvert.SerializeObject(countryAuthorizations, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
[
{
"CountryCode":"FI",
"CountryName":"Finland",
"Authorization":{
"BlockUserCreation":false,
"BlockBankAccountCreation":false,
"BlockPayout":false
},
"LastUpdate":1644574249
},
{
"CountryCode":"FR",
"CountryName":"France",
"Authorization":{
"BlockUserCreation":false,
"BlockBankAccountCreation":false,
"BlockPayout":false
},
"LastUpdate":1644574249
}
]
Country authorizations
List Authorizations for all countries
GET
/
v2.01
/
countries
/
authorizations
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
const listCountryAuthorizations = async () => {
return await mangopay.Regulatory.getAllCountriesAuthorizations()
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listCountryAuthorizations()
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def listCountryAuthorization()
begin
response = MangoPay::Regulatory.get_all_countries_authorizations()
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch country authorizations: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
listCountryAuthorization()
import java.util.List;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.Pagination;
import com.mangopay.entities.CountryAuthorization;
public class ListCountryAuthorizations {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
List<CountryAuthorization> countryAuthorizations = mangopay.getRegulatoryApi().getAllCountriesAuthorizations(new Pagination(1, 100), null);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(countryAuthorizations);
System.out.println(prettyJson);
}
}
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 CountryAuthorization
country_authorizations = CountryAuthorization.get_all_countries_authorizations()
for country_authorization in country_authorizations:
pprint(country_authorization._data)
pprint(vars(country_authorization.authorization))
print()
using MangoPay.SDK;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var countryAuthorizations = await api.Regulatory.GetAllCountriesAuthorizations();
string prettyPrint = JsonConvert.SerializeObject(countryAuthorizations, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
[
{
"CountryCode":"FI",
"CountryName":"Finland",
"Authorization":{
"BlockUserCreation":false,
"BlockBankAccountCreation":false,
"BlockPayout":false
},
"LastUpdate":1644574249
},
{
"CountryCode":"FR",
"CountryName":"France",
"Authorization":{
"BlockUserCreation":false,
"BlockBankAccountCreation":false,
"BlockPayout":false
},
"LastUpdate":1644574249
}
]
This call returns the restrictions of all countries.
Responses
200
200
array
The list of countries and their restrictions.
Show properties
Show properties
object
The country authorization object indicating if there are restrictions for a given country.
Show properties
Show properties
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The code of the country.
string
Name of the country.
object
Information about the country’s restrictions.
Hide properties
Hide properties
boolean
Whether or not user creation is possible based on the user’s country of residence, address, and nationality.
boolean
Whether or not bank account creation is possible based on the bank’s country of domiciliation.
boolean
Whether or not payout creation is possible based on the bank’s country of domiciliation.
Unix timestamp
The date and time when at least one of the country’s authorizations has been last updated.
[
{
"CountryCode":"FI",
"CountryName":"Finland",
"Authorization":{
"BlockUserCreation":false,
"BlockBankAccountCreation":false,
"BlockPayout":false
},
"LastUpdate":1644574249
},
{
"CountryCode":"FR",
"CountryName":"France",
"Authorization":{
"BlockUserCreation":false,
"BlockBankAccountCreation":false,
"BlockPayout":false
},
"LastUpdate":1644574249
}
]
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
const listCountryAuthorizations = async () => {
return await mangopay.Regulatory.getAllCountriesAuthorizations()
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listCountryAuthorizations()
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def listCountryAuthorization()
begin
response = MangoPay::Regulatory.get_all_countries_authorizations()
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch country authorizations: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
listCountryAuthorization()
import java.util.List;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.Pagination;
import com.mangopay.entities.CountryAuthorization;
public class ListCountryAuthorizations {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
List<CountryAuthorization> countryAuthorizations = mangopay.getRegulatoryApi().getAllCountriesAuthorizations(new Pagination(1, 100), null);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(countryAuthorizations);
System.out.println(prettyJson);
}
}
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 CountryAuthorization
country_authorizations = CountryAuthorization.get_all_countries_authorizations()
for country_authorization in country_authorizations:
pprint(country_authorization._data)
pprint(vars(country_authorization.authorization))
print()
using MangoPay.SDK;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var countryAuthorizations = await api.Regulatory.GetAllCountriesAuthorizations();
string prettyPrint = JsonConvert.SerializeObject(countryAuthorizations, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?