{
"UserCategory": "PAYER",
"TermsAndConditionsAccepted": false,
"Tag": "New tag"
}
{
"UserCategory": "OWNER",
"TermsAndConditionsAccepted": true,
"Tag": "New tag"
}
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 updateNaturalUserSca(naturalUserScaId, naturalUserScaObject)
begin
response = MangoPay::NaturalUserSca.update(naturalUserScaId, naturalUserScaObject)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to update User: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myNaturalUserSca = {
Tag: 'New tag',
TermsAndConditionsAccepted: true
}
updateNaturalUserSca('user_m_01K85WWVZQ460EDEKFXRQJGWTQ', myNaturalUserSca)
using MangoPay.SDK;
using MangoPay.SDK.Entities.PUT;
using Newtonsoft.Json;
public class UpdateNaturalUserSca
{
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 myUser = new UserNaturalScaPutDTO
{
Tag = "Updated tag",
TermsAndConditionsAccepted = true
};
var updateNaturalUser = await api.Users.UpdateNaturalAsync(myUser, userId);
string prettyPrint = JsonConvert.SerializeObject(updateNaturalUser, Formatting.Indented);
Console.WriteLine(prettyPrint);
}).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/';
try {
$user = $api->Users->GetNaturalSca('user_m_01K892TWJ21N0D37DMXWJXKX3D');
$user->Tag = 'Updated Tag';
$user->TermsAndConditionsAccepted = true;
$response = $api->Users->UpdateSca($user);
print_r($response);
} catch (MGPResponseException $e) {
print_r($e);
} catch (MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let myNaturalUser = {
Id: '171666652',
Address: {
AddressLine1: '15 Edgeware Road',
AddressLine2: null,
City: 'Manchester',
Region: null,
PostalCode: 'M1 4HG',
Country: 'GB',
},
FirstName: 'Rupert',
LastName: 'Bear',
Birthday: 656640000,
Nationality: 'GB',
CountryOfResidence: 'GB',
Tag: 'Created using the Mangopay NodeJS SDK',
Email: 'rupert.bear@example.com',
TermsAndConditionsAccepted: true,
UserCategory: 'OWNER',
PersonType: 'NATURAL',
NaturalSca: true,
}
const updateNaturalUser = async (user) => {
return await mangopay.Users.update(user)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
updateNaturalUser(myNaturalUser)
{
"FirstName": "Alex",
"LastName": "Smith",
"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": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "New tag",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
{
"FirstName": "Alex",
"LastName": "Smith",
"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": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "New tag",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
Users
Update a Natural User (SCA)
Modify details for a Natural Payer or Owner without changing category
PUT
/
v2.01
/
{ClientId}
/
sca
/
users
/
natural
/
{UserId}
{
"UserCategory": "PAYER",
"TermsAndConditionsAccepted": false,
"Tag": "New tag"
}
{
"UserCategory": "OWNER",
"TermsAndConditionsAccepted": true,
"Tag": "New tag"
}
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 updateNaturalUserSca(naturalUserScaId, naturalUserScaObject)
begin
response = MangoPay::NaturalUserSca.update(naturalUserScaId, naturalUserScaObject)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to update User: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myNaturalUserSca = {
Tag: 'New tag',
TermsAndConditionsAccepted: true
}
updateNaturalUserSca('user_m_01K85WWVZQ460EDEKFXRQJGWTQ', myNaturalUserSca)
using MangoPay.SDK;
using MangoPay.SDK.Entities.PUT;
using Newtonsoft.Json;
public class UpdateNaturalUserSca
{
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 myUser = new UserNaturalScaPutDTO
{
Tag = "Updated tag",
TermsAndConditionsAccepted = true
};
var updateNaturalUser = await api.Users.UpdateNaturalAsync(myUser, userId);
string prettyPrint = JsonConvert.SerializeObject(updateNaturalUser, Formatting.Indented);
Console.WriteLine(prettyPrint);
}).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/';
try {
$user = $api->Users->GetNaturalSca('user_m_01K892TWJ21N0D37DMXWJXKX3D');
$user->Tag = 'Updated Tag';
$user->TermsAndConditionsAccepted = true;
$response = $api->Users->UpdateSca($user);
print_r($response);
} catch (MGPResponseException $e) {
print_r($e);
} catch (MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let myNaturalUser = {
Id: '171666652',
Address: {
AddressLine1: '15 Edgeware Road',
AddressLine2: null,
City: 'Manchester',
Region: null,
PostalCode: 'M1 4HG',
Country: 'GB',
},
FirstName: 'Rupert',
LastName: 'Bear',
Birthday: 656640000,
Nationality: 'GB',
CountryOfResidence: 'GB',
Tag: 'Created using the Mangopay NodeJS SDK',
Email: 'rupert.bear@example.com',
TermsAndConditionsAccepted: true,
UserCategory: 'OWNER',
PersonType: 'NATURAL',
NaturalSca: true,
}
const updateNaturalUser = async (user) => {
return await mangopay.Users.update(user)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
updateNaturalUser(myNaturalUser)
{
"FirstName": "Alex",
"LastName": "Smith",
"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": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "New tag",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
{
"FirstName": "Alex",
"LastName": "Smith",
"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": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "New tag",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
Caution – Modification may trigger SCA re-enrollmentIf
UserCategory is OWNER, modifying the following values changes UserStatus to PENDING_USER_ACTION and requires re-enrollment in SCA using the returned PendingUserAction.RedirectUrl:EmailPhoneNumberPhoneNumberCountry
accept in the Natural User’s Email – for example accept@example.com or john.doe+accept@example.com.Caution – Modification may cause KYC/B verification downgradeIf
KYCLevel is REGULAR, modifying the following values triggers a verification downgrade to LIGHT:FirstNameLastNameBirthdayNationality
Note – Country-based restrictions apply to usersDue to Mangopay’s country restrictions, it is not possible to use blocked countries as the following:
NationalityCountryOfResidenceAddress.Country
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 updating account information and must re-enroll in SCA . 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 User data – it’s only related to the action being performed on the user.boolean
required
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.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
Required if
UserCategory is OWNER. 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
Format: Two-letter country code (ISO 3166-1 alpha-2 format)Required if
UserCategory is OWNER. Returned null if UserCategory is PAYER.The nationality of the individual.string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)Required if
UserCategory is OWNER. Returned null if UserCategory is PAYER.The country of residence of the individual.string
Max. length: 255 charactersReturned
null if UserCategory is PAYER.The occupation of the individual.integer
Allowed values:
1, 2, 3, 4, 5, 6, nullReturned 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
Max. length: 255 charactersCustom data that you can add to this object.
string
Format: A valid email addressThe individual’s email address.Caution: If
UserCategory is OWNER, modifying this value means the user will be required to re-enroll the new value in SCA via the PendingUserAction.RedirectUrl. For more details see the SCA guides.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
required
Max. length: 255 charactersThe first line of the address.
string
Max. length: 255 charactersThe second line of the address.
string
required
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
required
Max. length: 255 charactersThe postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces.
string
required
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country of the address.
Responses
200
200
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.
400 - Data doesn't comply with anti-fraud policy
400 - Data doesn't comply with anti-fraud policy
{
"Message": "The data you provided does not comply with our anti-fraud policy",
"Type": "fraud_policy",
"Id": "51876239-4814-422e-8f4b-6986520414bb#1750420019",
"Date": 1750420020,
"errors": null
}
400 - Invalid email
400 - Invalid email
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "864a164a-cbb9-4e9d-b140-2b83c720e729",
"Date": 1690291065.0,
"errors": {
"Email": "The field Email must match the regular expression '([a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*)@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?'."
}
}
400 - Restricted country
400 - Restricted country
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "31746ec8-51e6-4cd3-bf35-339b6646f3f4#1750669238",
"Date": 1750669239,
"errors": {
"CountryOfResidence": "The CountryOfResidence used is blocked"
}
}
403 - TermsAndConditionsAccepted must be true if OWNER
403 - TermsAndConditionsAccepted must be true if OWNER
{
"Message": "User must accept the terms and conditions before account creation or modification.",
"Type": "user_hasnt_accepted_terms_and_conditions",
"Id": "dbbc752b-6f9f-4248-a4bb-04ee0ba7b4b7",
"Date": 1730810728,
"errors": null
}
403 - Consent not given for proxy when USER_NOT_PRESENT sent
403 - Consent not given for proxy when USER_NOT_PRESENT sent
403 - Forbidden
{
"Message": "You are not authorized to perform this action. The user has not provided consent to the requested proxy",
"Type": "sca_proxy_missing",
"Id": "bbf56cc0-079d-44fd-9e23-53bdb3e283e5#1762177336",
"Date": 1762177337,
"errors": null
}
USER_NOT_PRESENT for ScaContext with new values for Email, PhoneNumber or PhoneNumberCountry, but the user has not given (or has revoked) their consent for your platform to update SCA contact information in their absence.There are two ways to resolve this:- Ask the user to consent to your use of
USER_NOT_PRESENTfor this action by ticking the checkbox returned on the POST Manage proxy consent for a User endpoint - Send the API call to update SCA contact information again but with
ScaContextset toUSER_PRESENT, and redirect the user to authenticate the action
400 - Birthday can't indicate an age older than 120 years
400 - Birthday can't indicate an age older than 120 years
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "741b5be7-a34c-4fd4-abb5-75b23d0b1cec",
"Date": 1776242161.0,
"errors": {
"Birthday": "The Birthday value indicates an age over 120 years, which is not allowed."
}
}
{
"FirstName": "Alex",
"LastName": "Smith",
"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": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "New tag",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
{
"FirstName": "Alex",
"LastName": "Smith",
"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": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "New tag",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
{
"UserCategory": "PAYER",
"TermsAndConditionsAccepted": false,
"Tag": "New tag"
}
{
"UserCategory": "OWNER",
"TermsAndConditionsAccepted": true,
"Tag": "New tag"
}
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 updateNaturalUserSca(naturalUserScaId, naturalUserScaObject)
begin
response = MangoPay::NaturalUserSca.update(naturalUserScaId, naturalUserScaObject)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to update User: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myNaturalUserSca = {
Tag: 'New tag',
TermsAndConditionsAccepted: true
}
updateNaturalUserSca('user_m_01K85WWVZQ460EDEKFXRQJGWTQ', myNaturalUserSca)
using MangoPay.SDK;
using MangoPay.SDK.Entities.PUT;
using Newtonsoft.Json;
public class UpdateNaturalUserSca
{
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 myUser = new UserNaturalScaPutDTO
{
Tag = "Updated tag",
TermsAndConditionsAccepted = true
};
var updateNaturalUser = await api.Users.UpdateNaturalAsync(myUser, userId);
string prettyPrint = JsonConvert.SerializeObject(updateNaturalUser, Formatting.Indented);
Console.WriteLine(prettyPrint);
}).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/';
try {
$user = $api->Users->GetNaturalSca('user_m_01K892TWJ21N0D37DMXWJXKX3D');
$user->Tag = 'Updated Tag';
$user->TermsAndConditionsAccepted = true;
$response = $api->Users->UpdateSca($user);
print_r($response);
} catch (MGPResponseException $e) {
print_r($e);
} catch (MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let myNaturalUser = {
Id: '171666652',
Address: {
AddressLine1: '15 Edgeware Road',
AddressLine2: null,
City: 'Manchester',
Region: null,
PostalCode: 'M1 4HG',
Country: 'GB',
},
FirstName: 'Rupert',
LastName: 'Bear',
Birthday: 656640000,
Nationality: 'GB',
CountryOfResidence: 'GB',
Tag: 'Created using the Mangopay NodeJS SDK',
Email: 'rupert.bear@example.com',
TermsAndConditionsAccepted: true,
UserCategory: 'OWNER',
PersonType: 'NATURAL',
NaturalSca: true,
}
const updateNaturalUser = async (user) => {
return await mangopay.Users.update(user)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
updateNaturalUser(myNaturalUser)
Was this page helpful?