// GET has no body parameters
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-mangopay-client-id',
clientApiKey: 'your-mangopay-api-key',
})
let user = {
Id: "user_m_01JTNJDEXCGS9G3X4ZZDPE2A8R",
};
const getUser = async (userId) => {
return await mangopay.Users.getSca(userId)
.then((response) => {
console.info(response);
return response;
})
.catch((err) => {
console.log(err);
return false;
});
};
getUser(user.Id);
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 getNaturalUserSca(userId)
begin
response1 = MangoPay::NaturalUserSca.fetch(userId)
# or:
response2 = MangoPay::User.fetch_sca(userId)
puts response1
puts response2
return response1
rescue MangoPay::ResponseError => error
puts "Failed to fetch User: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
getNaturalUserSca('user_m_01K85X5HKK3YD61Y3YXD9FHV7H')
using MangoPay.SDK;
using Newtonsoft.Json;
public class ViewUserSca
{
public void Run()
{
Task.Run(async () =>
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var userId = "user_m_01K8AZGCCWGE9AA7J2M7ZE0SQ5";
var viewUser = await api.Users.GetScaAsync(userId);
// or:
// var viewUserNatural = await api.Users.GetNaturalScaAsync(userId);
// var viewUserLegal = await api.Users.GetNaturalScaAsync(userId);
string prettyPrint = JsonConvert.SerializeObject(viewUser, Formatting.Indented);
string prettyPrintNatural = JsonConvert.SerializeObject(viewUserNatural, Formatting.Indented);
string prettyPrintLegal = JsonConvert.SerializeObject(viewUserLegal, Formatting.Indented);
Console.WriteLine(prettyPrint);
Console.WriteLine(prettyPrintNatural);
Console.WriteLine(prettyPrintLegal);
}).GetAwaiter().GetResult();
}
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\Libraries\Exception as MGPException;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\MangoPayApi;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-mangopay-api-key';
$api->Config->TemporaryFolder = 'tmp/';
// $api->Config->DebugMode = true;
try {
// $userId = ;
$user = $api->Users->GetSca('user_m_01K8932FJ54AF8BY7PY80G0JG1');
// OR:
// $userNatural = $api->Users->GetNaturalSca('user_m_01K8932FJ54AF8BY7PY80G0JG1');
// $userLegal = $api->Users->GetLegalSca('user_m_01K8932FJ54AF8BY7PY80G0JG1');
print_r($user);
print_r($userNatural);
print_r($userLegal);
} catch (MGPResponseException $e) {
print_r($e);
} catch (MGPException $e) {
print_r($e);
}
{
"FirstName": "Ruby",
"LastName": "Reinger",
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
{
"FirstName": "Ruby",
"LastName": "Reinger",
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Email": null,
"PhoneNumber": null,
"PhoneNumberCountry": null
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": null,
"PendingUserAction": null,
"HeadquartersAddress": {
"AddressLine1": null,
"AddressLine2": null,
"City": null,
"Region": null,
"PostalCode": null,
"Country": null
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Id": "user_m_01JF7FKVP51PS3TYKCN79VZZ8M",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734344306,
"PersonType": "LEGAL",
"Email": "alex.smith.services@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Email": "alex.smith@example.com",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR"
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": "123456789",
"PendingUserAction": null,
"HeadquartersAddress": {
"AddressLine1": "100 Rue de Rivoli",
"AddressLine2": "Bâtiment B",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Id": "user_m_01JF7FKVP51PS3TYKCN79VZZ8M",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734344306,
"PersonType": "LEGAL",
"Email": "alex.smith.services@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1734344306,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
Users
View a User (SCA)
Retrieve a Natural or Legal User
GET
/
v2.01
/
{ClientId}
/
sca
/
users
/
{UserId}
// GET has no body parameters
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-mangopay-client-id',
clientApiKey: 'your-mangopay-api-key',
})
let user = {
Id: "user_m_01JTNJDEXCGS9G3X4ZZDPE2A8R",
};
const getUser = async (userId) => {
return await mangopay.Users.getSca(userId)
.then((response) => {
console.info(response);
return response;
})
.catch((err) => {
console.log(err);
return false;
});
};
getUser(user.Id);
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 getNaturalUserSca(userId)
begin
response1 = MangoPay::NaturalUserSca.fetch(userId)
# or:
response2 = MangoPay::User.fetch_sca(userId)
puts response1
puts response2
return response1
rescue MangoPay::ResponseError => error
puts "Failed to fetch User: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
getNaturalUserSca('user_m_01K85X5HKK3YD61Y3YXD9FHV7H')
using MangoPay.SDK;
using Newtonsoft.Json;
public class ViewUserSca
{
public void Run()
{
Task.Run(async () =>
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var userId = "user_m_01K8AZGCCWGE9AA7J2M7ZE0SQ5";
var viewUser = await api.Users.GetScaAsync(userId);
// or:
// var viewUserNatural = await api.Users.GetNaturalScaAsync(userId);
// var viewUserLegal = await api.Users.GetNaturalScaAsync(userId);
string prettyPrint = JsonConvert.SerializeObject(viewUser, Formatting.Indented);
string prettyPrintNatural = JsonConvert.SerializeObject(viewUserNatural, Formatting.Indented);
string prettyPrintLegal = JsonConvert.SerializeObject(viewUserLegal, Formatting.Indented);
Console.WriteLine(prettyPrint);
Console.WriteLine(prettyPrintNatural);
Console.WriteLine(prettyPrintLegal);
}).GetAwaiter().GetResult();
}
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\Libraries\Exception as MGPException;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\MangoPayApi;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-mangopay-api-key';
$api->Config->TemporaryFolder = 'tmp/';
// $api->Config->DebugMode = true;
try {
// $userId = ;
$user = $api->Users->GetSca('user_m_01K8932FJ54AF8BY7PY80G0JG1');
// OR:
// $userNatural = $api->Users->GetNaturalSca('user_m_01K8932FJ54AF8BY7PY80G0JG1');
// $userLegal = $api->Users->GetLegalSca('user_m_01K8932FJ54AF8BY7PY80G0JG1');
print_r($user);
print_r($userNatural);
print_r($userLegal);
} catch (MGPResponseException $e) {
print_r($e);
} catch (MGPException $e) {
print_r($e);
}
{
"FirstName": "Ruby",
"LastName": "Reinger",
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
{
"FirstName": "Ruby",
"LastName": "Reinger",
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Email": null,
"PhoneNumber": null,
"PhoneNumberCountry": null
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": null,
"PendingUserAction": null,
"HeadquartersAddress": {
"AddressLine1": null,
"AddressLine2": null,
"City": null,
"Region": null,
"PostalCode": null,
"Country": null
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Id": "user_m_01JF7FKVP51PS3TYKCN79VZZ8M",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734344306,
"PersonType": "LEGAL",
"Email": "alex.smith.services@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Email": "alex.smith@example.com",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR"
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": "123456789",
"PendingUserAction": null,
"HeadquartersAddress": {
"AddressLine1": "100 Rue de Rivoli",
"AddressLine2": "Bâtiment B",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Id": "user_m_01JF7FKVP51PS3TYKCN79VZZ8M",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734344306,
"PersonType": "LEGAL",
"Email": "alex.smith.services@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1734344306,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
This endpoint returns the same data as the legacy GET View a User, including the new
Read more →
PENDING_USER_ACTION value for UserStatus, with two minor changes:
- The
PendingUserActionfield, which is alwaysnullon this endpoint - For Legal users, the
LegalRepresentativeobject, which contains the data for the legal representative
Note –
RedirectUrl not available on this endpointThe RedirectUrl is only returned on API calls that trigger SCA.To obtain a new session link for an Owner, call the POST Enroll a User in SCA endpoint.Path parameters
string
required
The unique identifier of the user.
Responses
200 - Natural
200 - Natural
string
Min. length: 1; max. length: 100The first name of the individual.
string
Min. length: 1; max. length: 100The last name of the individual.
Unix timestamp
Returned
null if UserCategory is PAYER.The date of birth of the individual.Note: This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.string
Returned
null if UserCategory is PAYER.The nationality of the individual.string
Returned
null if UserCategory is PAYER.The country of residence of the individual.string
Max. length: 255 charactersThe occupation of the individual.Returned
null if UserCategory is PAYER.integer
Returned
null if UserCategory is PAYER.The bracket indicating the income of the individual. The brackets are:- 1: < 18K
- 2: 18K - 30K
- 3: 30K - 50K
- 4: 50K - 80K
- 5: 80K - 120K
- 6: > 120K
string
The
Id of the KYC Document whose Type is IDENTITY_PROOF if validated for the user. If no identity proof is validated, then this value is null.string
The
Id of the KYC Document whose Type is ADDRESS_PROOF if validated for the user. If no address proof is validated, then this value is null.string
This is a deprecated parameter.
string
Format: International E.164 standard (preceded by plus sign and country code) or local formatThe individual’s phone number. The local format (recommended) requires
PhoneNumberCountry to ensure correct formatting.If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.For users with UserCategory OWNER , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)Required if the
PhoneNumber is provided in local format (recommended), to render the value in the E.164 standard.object
The postal address of the user.
Show properties
Show properties
string
Max. length: 255 charactersThe first line of the address.
string
Max. length: 255 charactersThe second line of the address.
string
Max. length: 255 charactersThe city of the address.
string
Max. length: 255 charactersThe region of the address. This field is optional except if the
Country is US, CA, or MX.string
Max. length: 255 charactersThe postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces.
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country of the address.
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.string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
string
Max. length: 255 charactersCustom data that you can add to this object.
Unix timestamp
The date and time at which the object was created.
string
Returned values: NATURAL, LEGALThe type of the user:
NATURAL– Natural users are individuals (natural persons).LEGAL– Legal users are legal entities (legal persons) like companies, non-profits, and sole proprietors.
PersonType is defined by the endpoint used to create the user and can’t be modified.string
Format: A valid email addressThe individual’s email address.
string
Default value:
LIGHTReturned values: LIGHT, REGULARThe verification status of the user set by Mangopay:LIGHT– Unverified, assigned by default to all users.REGULAR– Verified, meaning the user has successfully completed the verification process and had the necessary documents validated by Mangopay. Only users whoseUserCategoryisOWNERcan submit verification documents for validation. Only users whoseKYCLevelisREGULARcan request payouts.
boolean
Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract, see the T&Cs guide for details).Must be
true if UserCategory is OWNER.Unix timestamp
The date and time at which the
TermsAndConditionsAccepted value was set to true.Returned null if UserCategory is PAYER.string
Possible values:
PAYER, OWNER, PLATFORMThe category of the user:PAYER– User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).OWNER– User who can also receive transfers to their wallets. Owners are able to request KYC verification, which if successful gives them theKYCLevelofREGULARand the ability to request payouts.PLATFORM– Single specific user that represents the platform. ThePLATFORMvalue is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
string
Returned values:
PENDING_USER_ACTION, ACTIVE, CLOSEDThe status of the user:PENDING_USER_ACTION– The user must enroll in SCA before they can becomeACTIVE.ACTIVE– The user account is active and the user can access Mangopay features.CLOSED– The user account is permanently closed. This value is used by Mangopay to close an account following the procedure outlined in the terms and conditions.
200 - Legal
200 - Legal
string
Max. length: 255 charactersThe registered legal name of the entity. The
Name value should be the one registered with the relevant national authority.string
Returned values: BUSINESS, PARTNERSHIP, ORGANIZATION, SOLETRADERThe type of legal user. For information on which
LegalPersonType to use for a particular local legal structure, see the verification requirements.Caution: Modification of the LegalPersonType may result in a verification downgrade.object
Information about the legal representative declared for the user.
Show properties
Show properties
string
Min. length: 1; max. length: 100The first name of the individual.
string
Min. length: 1; max. length: 100The last name of the individual.
string
The
Id of the KYC Document whose Type is IDENTITY_PROOF if validated for the user. If no identity proof is validated, then this value is null.Unix timestamp
Returned
null if UserCategory is PAYER.The date of birth of the individual.Note: This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.string
Returned
null if UserCategory is PAYER.The nationality of the individual.string
Returned
null if UserCategory is PAYER.The country of residence of the individual.string
Format: A valid email addressRequired if
UserCategory is OWNER. Returned null if UserCategory is PAYER.The individual’s email address. For OWNER users, SCA uses this email address to build a behavioral biometrics profile and as a backup communication channel.string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)Required if the
PhoneNumber is provided in local format (recommended), to render the value in the E.164 standard.string
Format: International E.164 standard (preceded by plus sign and country code) or local formatThe individual’s phone number. The local format (recommended) requires
PhoneNumberCountry to ensure correct formatting.If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.For users with UserCategory OWNER , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.string
The
Id of the KYC Document whose Type is REGISTRATION_PROOF if validated for the user. If no registration proof is validated, then this value is null.string
The
Id of the KYC Document whose Type is SHAREHOLDERS_DECLARATION if validated for the user. If no Shareholder Declaration is validated, then this value is null.string
The
Id of the KYC Document whose Type is ARTICLES_OF_ASSOCIATION if validated for the user. If no articles of association document is validated, then this value is null.string
Required if
UserCategory is OWNER and LegalPersonType is BUSINESS. Returned null if UserCategory is PAYER.The registration number of the entity, assigned by the relevant national authority. For information on the expected format for a specific country, see the Company number guide. To validate the format of a number before submitting documents for verification, use POST Validate the format of User data.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
The legally registered address of the entity’s administrative center.
This object’s sub-parameters are
This object’s sub-parameters are
null if the UserCategory is PAYER.Show properties
Show properties
string
Max. length: 255 charactersThe first line of the address.
string
Max. length: 255 charactersThe second line of the address.
string
Max. length: 255 charactersThe city of the address.
string
Max. length: 255 charactersThe region of the address. This field is optional except if the
Country is US, CA, or MX.string
Max. length: 255 charactersThe postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces.
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country of the address.
object
The address of the entity’s legal representative.
Show properties
Show properties
string
Max. length: 255 charactersThe first line of the address.
string
Max. length: 255 charactersThe second line of the address.
string
Max. length: 255 charactersThe city of the address.
string
Max. length: 255 charactersThe region of the address. This field is optional except if the
Country is US, CA, or MX.string
Max. length: 255 charactersThe postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces.
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country of the address.
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
string
Max. length: 255 charactersCustom data that you can add to this object.
Unix timestamp
The date and time at which the object was created.
string
Returned values: NATURAL, LEGALThe type of the user:
NATURAL– Natural users are individuals (natural persons).LEGAL– Legal users are legal entities (legal persons) like companies, non-profits, and sole proprietors.
PersonType is defined by the endpoint used to create the user and can’t be modified.string
Format: A valid email addressThe email address for the entity.
string
Default value:
LIGHTReturned values: LIGHT, REGULARThe verification status of the user set by Mangopay:LIGHT– Unverified, assigned by default to all users.REGULAR– Verified, meaning the user has successfully completed the verification process and had the necessary documents validated by Mangopay. Only users whoseUserCategoryisOWNERcan submit verification documents for validation. Only users whoseKYCLevelisREGULARcan request payouts.
boolean
Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract, see the T&Cs guide for details).Must be
true if UserCategory is OWNER.Unix timestamp
The date and time at which the
TermsAndConditionsAccepted value was set to true.Returned null if UserCategory is PAYER.string
Possible values:
PAYER, OWNER, PLATFORMThe category of the user:PAYER– User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).OWNER– User who can also receive transfers to their wallets. Owners are able to request KYC verification, which if successful gives them theKYCLevelofREGULARand the ability to request payouts.PLATFORM– Single specific user that represents the platform. ThePLATFORMvalue is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
string
Returned values:
PENDING_USER_ACTION, ACTIVE, CLOSEDThe status of the user:PENDING_USER_ACTION– The user must enroll in SCA before they can becomeACTIVE.ACTIVE– The user account is active and the user can access Mangopay features.CLOSED– The user account is permanently closed. This value is used by Mangopay to close an account following the procedure outlined in the terms and conditions.
{
"FirstName": "Ruby",
"LastName": "Reinger",
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
{
"FirstName": "Ruby",
"LastName": "Reinger",
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Email": null,
"PhoneNumber": null,
"PhoneNumberCountry": null
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": null,
"PendingUserAction": null,
"HeadquartersAddress": {
"AddressLine1": null,
"AddressLine2": null,
"City": null,
"Region": null,
"PostalCode": null,
"Country": null
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Id": "user_m_01JF7FKVP51PS3TYKCN79VZZ8M",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734344306,
"PersonType": "LEGAL",
"Email": "alex.smith.services@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Email": "alex.smith@example.com",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR"
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": "123456789",
"PendingUserAction": null,
"HeadquartersAddress": {
"AddressLine1": "100 Rue de Rivoli",
"AddressLine2": "Bâtiment B",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Id": "user_m_01JF7FKVP51PS3TYKCN79VZZ8M",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734344306,
"PersonType": "LEGAL",
"Email": "alex.smith.services@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1734344306,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
// GET has no body parameters
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-mangopay-client-id',
clientApiKey: 'your-mangopay-api-key',
})
let user = {
Id: "user_m_01JTNJDEXCGS9G3X4ZZDPE2A8R",
};
const getUser = async (userId) => {
return await mangopay.Users.getSca(userId)
.then((response) => {
console.info(response);
return response;
})
.catch((err) => {
console.log(err);
return false;
});
};
getUser(user.Id);
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 getNaturalUserSca(userId)
begin
response1 = MangoPay::NaturalUserSca.fetch(userId)
# or:
response2 = MangoPay::User.fetch_sca(userId)
puts response1
puts response2
return response1
rescue MangoPay::ResponseError => error
puts "Failed to fetch User: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
getNaturalUserSca('user_m_01K85X5HKK3YD61Y3YXD9FHV7H')
using MangoPay.SDK;
using Newtonsoft.Json;
public class ViewUserSca
{
public void Run()
{
Task.Run(async () =>
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var userId = "user_m_01K8AZGCCWGE9AA7J2M7ZE0SQ5";
var viewUser = await api.Users.GetScaAsync(userId);
// or:
// var viewUserNatural = await api.Users.GetNaturalScaAsync(userId);
// var viewUserLegal = await api.Users.GetNaturalScaAsync(userId);
string prettyPrint = JsonConvert.SerializeObject(viewUser, Formatting.Indented);
string prettyPrintNatural = JsonConvert.SerializeObject(viewUserNatural, Formatting.Indented);
string prettyPrintLegal = JsonConvert.SerializeObject(viewUserLegal, Formatting.Indented);
Console.WriteLine(prettyPrint);
Console.WriteLine(prettyPrintNatural);
Console.WriteLine(prettyPrintLegal);
}).GetAwaiter().GetResult();
}
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\Libraries\Exception as MGPException;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\MangoPayApi;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-mangopay-api-key';
$api->Config->TemporaryFolder = 'tmp/';
// $api->Config->DebugMode = true;
try {
// $userId = ;
$user = $api->Users->GetSca('user_m_01K8932FJ54AF8BY7PY80G0JG1');
// OR:
// $userNatural = $api->Users->GetNaturalSca('user_m_01K8932FJ54AF8BY7PY80G0JG1');
// $userLegal = $api->Users->GetLegalSca('user_m_01K8932FJ54AF8BY7PY80G0JG1');
print_r($user);
print_r($userNatural);
print_r($userLegal);
} catch (MGPResponseException $e) {
print_r($e);
} catch (MGPException $e) {
print_r($e);
}
Was this page helpful?