> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mangopay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Categorize a Natural User

> Transition a Natural Payer to Owner and enroll them in SCA

This endpoint allows you to transition a user whose `UserCategory` is `PAYER` into an `OWNER` by providing the required information and redirecting them on the `PendingUserAction.RedirectUrl` response value to complete SCA enrollment.

Optionally, you can update the `Email` and provide or update the `PhoneNumber` and `PhoneNumberCountry` before SCA redirection.

If the user's `UserCategory` is already `OWNER`, use the [POST Enroll a User in SCA](/api-reference/users/enroll-user) endpoint to obtain an SCA session link.

[Read more about SCA redirection](/guides/sca/session) **→**

<Note>
  **Note – Country-based restrictions apply to users**

  Due to Mangopay's [country restrictions](/guides/users/country-restrictions), it is not possible to use blocked countries as the following:

  * `Nationality`
  * `CountryOfResidence`
</Note>

### Body parameters

<ParamField body="UserCategory" type="string" required>
  **Allowed values:** `OWNER`

  The new category of the user, which must be `OWNER`.
</ParamField>

<ParamField body="TermsAndConditionsAccepted" type="boolean" required>
  **Allowed values:** `true`

  Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
</ParamField>

<ParamField body="Email" type="string">
  Format: A valid email address

  The individual's email address.
</ParamField>

<ParamField body="Birthday" type="Unix timestamp" required>
  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.
</ParamField>

<ParamField body="Nationality" type="string" required>
  Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))

  The nationality of the individual.
</ParamField>

<ParamField body="CountryOfResidence" type="string" required>
  Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))

  The country of residence of the individual.
</ParamField>

<ParamField body="PhoneNumber" type="string">
  Format: International E.164 standard (preceded by plus sign and country code) or local format

  The 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.
</ParamField>

<ParamField body="PhoneNumberCountry" type="string">
  Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))

  Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
</ParamField>

<ParamField body="ScaContext" type="string">
  **Possible values:** `USER_PRESENT`, `USER_NOT_PRESENT`

  **Default value:** `USER_PRESENT`

  The SCA context of the request, which is **required** if the `OWNER` value is being assigned for `UserCategory`:

  * `USER_PRESENT` – The user is on session during `OWNER` account creation and can enroll in SCA at the same time. The platform must [redirect the user](/guides/sca/session) using the `PendingUserAction.RedirectUrl` returned so that the user can complete the SCA session.
  * `USER_NOT_PRESENT` – The platform has explicit permission from Mangopay to create the `OWNER` user account without simultaneous SCA enrollment.

  Read more about [asynchronous SCA enrollment](/guides/sca/proxy-management#user-account-creation) **→**

  **Note:** On User endpoints, `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.
</ParamField>

### Responses

<AccordionGroup>
  <Accordion title="200">
    <ResponseField name="FirstName" type="string">
      Min. length: 1; max. length: 100

      The first name of the individual.
    </ResponseField>

    <ResponseField name="LastName" type="string">
      Min. length: 1; max. length: 100

      The last name of the individual.
    </ResponseField>

    <ResponseField name="Birthday" type="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.
    </ResponseField>

    <ResponseField name="Nationality" type="string">
      Returned `null` if `UserCategory` is `PAYER`.

      The nationality of the individual.
    </ResponseField>

    <ResponseField name="CountryOfResidence" type="string">
      Returned `null` if `UserCategory` is `PAYER`.

      The country of residence of the individual.
    </ResponseField>

    <ResponseField name="Occupation" type="string">
      Max. length: 255 characters

      The occupation of the individual.

      Returned `null` if `UserCategory` is `PAYER`.
    </ResponseField>

    <ResponseField name="IncomeRange" type="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
    </ResponseField>

    <ResponseField name="ProofOfIdentity" type="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`.
    </ResponseField>

    <ResponseField name="ProofOfAddress" type="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`.
    </ResponseField>

    <ResponseField name="Capacity" type="string">
      This is a deprecated parameter.
    </ResponseField>

    <ResponseField name="PhoneNumber" type="string">
      Format: International E.164 standard (preceded by plus sign and country code) or local format

      The 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.
    </ResponseField>

    <ResponseField name="PhoneNumberCountry" type="string">
      Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))

      Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
    </ResponseField>

    <ResponseField name="Address" type="object">
      The postal address of the user.

      <Expandable title="properties">
        <ResponseField name="AddressLine1" type="string">
          Max. length: 255 characters

          The first line of the address.
        </ResponseField>

        <ResponseField name="AddressLine2" type="string">
          Max. length: 255 characters

          The second line of the address.
        </ResponseField>

        <ResponseField name="City" type="string">
          Max. length: 255 characters

          The city of the address.
        </ResponseField>

        <ResponseField name="Region" type="string">
          Max. length: 255 characters

          The region of the address. This field is optional except if the `Country` is US, CA, or MX.
        </ResponseField>

        <ResponseField name="PostalCode" type="string">
          Max. length: 255 characters

          The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces.
        </ResponseField>

        <ResponseField name="Country" type="string">
          Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))

          The country of the address.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="PendingUserAction" type="object">
      Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).

      <Expandable title="properties" defaultOpen>
        <ResponseField name="RedirectUrl" type="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](/guides/sca/session#how-to-redirect-a-user-for-sca).
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="Id" type="string">
      Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)

      The unique identifier of the object.
    </ResponseField>

    <ResponseField name="Tag" type="string">
      Max. length: 255 characters

      Custom data that you can add to this object.
    </ResponseField>

    <ResponseField name="CreationDate" type="Unix timestamp">
      The date and time at which the object was created.
    </ResponseField>

    <ResponseField name="PersonType" type="string">
      **Returned values:** NATURAL, LEGAL

      The 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.

      The `PersonType` is defined by the endpoint used to create the user and can’t be modified.
    </ResponseField>

    <ResponseField name="Email" type="string">
      Format: A valid email address

      The individual's email address.
    </ResponseField>

    <ResponseField name="KYCLevel" type="string">
      **Default value:** `LIGHT`

      **Returned values:** `LIGHT`, `REGULAR`

      The 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 whose `UserCategory` is `OWNER` can submit verification documents for validation. Only users whose `KYCLevel` is `REGULAR` can request payouts.
    </ResponseField>

    <ResponseField name="TermsAndConditionsAccepted" type="boolean">
      Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).

      Must be `true` if `UserCategory` is `OWNER`.
    </ResponseField>

    <ResponseField name="TermsAndConditionsAcceptedDate" type="Unix timestamp">
      The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.

      Returned `null` if `UserCategory` is `PAYER`.
    </ResponseField>

    <ResponseField name="UserCategory" type="string">
      **Possible values:** `PAYER`, `OWNER`, `PLATFORM`

      The [category](/guides/users/categories) 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](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
      * `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
    </ResponseField>

    <ResponseField name="UserStatus" type="string">
      **Returned values:** `PENDING_USER_ACTION`, `ACTIVE`, `CLOSED`

      The status of the user:

      * `PENDING_USER_ACTION` – The user must enroll in SCA before they can become `ACTIVE`.
      * `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.
    </ResponseField>
  </Accordion>
</AccordionGroup>

<AccordionGroup>
  <Accordion title="400 - Endpoint not allowed if category already OWNER">
    ```Json theme={null}
    {
        "Message": "This endpoint is not allowed for User categorized as OWNER",
        "Type": "not_allowed_for_user_category_owner",
        "Id": "68d1c3e0-ea28-465b-9ef1-36f388fc896d",
        "Date": 1734348365.0,
        "errors": null
    }
    ```

    If the user's `UserCategory` is `OWNER`, use the [POST Enroll a User in SCA](/api-reference/users/enroll-user) endpoint to obtain an SCA session link.
  </Accordion>
</AccordionGroup>

<ResponseExample>
  ```json 200 - Owner pending SCA theme={null}
  {
      "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": {
          "RedirectUrl": "https://sca.sandbox.mangopay.com/?token=0193ceab0948799a9af9726fb852fb98"
      },
      "Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
      "Tag": "Created using 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"
  }
  ```
</ResponseExample>

<RequestExample>
  ```json REST theme={null}
  {
      "UserCategory": "OWNER",
      "TermsAndConditionsAccepted": true,
      // "Email": "alex.smith@example.com",
      // "PhoneNumber": "0611111111",
      // "PhoneNumberCountry": "FR",
      "Birthday": 652117514,
      "Nationality": "FR",
      "CountryOfResidence": "FR"
  }
  ```

  ```csharp .NET theme={null}
  using MangoPay.SDK;
  using MangoPay.SDK.Core.Enumerations;
  using MangoPay.SDK.Entities.PUT;
  using Newtonsoft.Json;

  public class CategorizeUser
  {
      public void Run()
      {
          Task.Run(async () =>
          {
              MangoPayApi api = new MangoPayApi();

          api.Config.ClientId = "your-client-id";
          api.Config.ClientPassword = "your-api-key";

              var categorizeNatural = new CategorizeUserNaturalPutDTO
              {
                  TermsAndConditionsAccepted = true,
                  UserCategory = UserCategory.OWNER,
                  Email = "john.doe.sca@sample.org",
                  PhoneNumber = "+33611111111",
                  PhoneNumberCountry = CountryIso.FR,
                  Birthday = new DateTime(1975, 12, 21, 0, 0, 0),
                  Nationality = CountryIso.FR,
                  CountryOfResidence = CountryIso.FR,
              };

              var categorized =
                  await api.Users.CategorizeNaturalAsync(categorizeNatural, "user_m_01K8B28H25JBHX1QFVC0T54S1Q");

              string prettyPrint = JsonConvert.SerializeObject(categorized, Formatting.Indented);
              Console.WriteLine(prettyPrint);
          }).GetAwaiter().GetResult();
      }
  }
  ```

  ```ruby Ruby theme={null}
  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 categorizeNaturalUser(userId, params)
    begin
      response = MangoPay::NaturalUserSca.categorize(userId, params)
      puts response
      return response
    rescue MangoPay::ResponseError => error
      puts "Failed to categorize User: #{error.message}"
      puts "Error details: #{error.details}"
      return false
    end
  end

  myNaturalUserSca = {
    UserCategory: 'OWNER',
    TermsAndConditionsAccepted: true,
    Birthday: 652117514,
    Nationality: 'FR',
    CountryOfResidence: 'FR'
  }

  categorizeNaturalUser('user_m_01K85X5HKK3YD61Y3YXD9FHV7H', myNaturalUserSca)
  ```

  ```php PHP theme={null}
  <?php
  require_once 'vendor/autoload.php';

  use MangoPay\Libraries\Exception as MGPException;
  use MangoPay\Libraries\ResponseException as MGPResponseException;
  use MangoPay\MangoPayApi;
  use MangoPay\UserCategory;

  $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 {
      $user = $api->Users->GetNaturalSca('user_m_01K8932FJ54AF8BY7PY80G0JG1');

      $user->UserCategory = UserCategory::Owner;
      $user->TermsAndConditionsAccepted = true;
      $user->Birthday = mktime(0, 0, 0, 12, 21, 1975);
      $user->Nationality = "FR";
      $user->CountryOfResidence = "FR";
      $user->PhoneNumber = "+33611111111";
      $user->PhoneNumberCountry = "FR";

      $response = $api->Users->Categorize($user);

      print_r($response);
  } catch (MGPResponseException $e) {
      print_r($e);
  } catch (MGPException $e) {
      print_r($e);
  }
  ```
</RequestExample>
