> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Signing Up a Customer

> Learn how to submit applications and compliance documentation to enroll customers in your issuing program.

<Check>
  **Consumer and corporate programs only:**

  This page applies to Consumer and Corporate Programs. This is not relevant to Authorized User Program.
</Check>

When a customer enrolls in your issuing program, you must submit an application and the required compliance documentation. This process ensures regulatory compliance and allows users to set up accounts. The application workflow varies slightly between consumer and corporate programs, with each requiring different submission methods and supporting documents.

<Steps>
  <Step title="Submit an application [Required]">
    When a customer signs up for your issuing program, you must submit an application for them. You will also need to submit specific compliance documentation with the application. There are minor differences between consumer and corporate programs.

    <Warning>
      **Compliance requirements may differ between contracts:**

      Depending on the contract you have with Rain, you may be able to pass less or no compliance data when submitting an application. Read your contract carefully, or contact [platform@rain.xyz](mailto:platform@rain.xyz) for help.
    </Warning>

    The endpoints for submitting an application are different, depending on the program:

    * **Consumer programs**: [Create a consumer application for a user](/reference/applications/create-a-consumer-application-for-a-user)
    * **Corporate programs**: [Create a corporate application for a company](/reference/applications/create-a-corporate-application-for-a-company)

    <Info>
      **Creating a corporate application also creates a user:**

      Rain requires every company on the Rain platform to have at least one user. This user must have a wallet, and this wallet will be an admin on their Rain smart contract. For your convenience, you can pass in both the user and company data to the same endpoint.
    </Info>

    You must pass the IP address of the user in the request. If you have this handy - great! If not, you can always fetch it when the user signs up or applies for the card program.

    Rain responds to the request with a user object. To view the status of the application, check the `user.applicationStatus` field. For more detail, see [the different application statuses](/docs/application-states).

    <Info>
      **More information about UBOs:**

      For more information about UBOs, read the [Ultimate Beneficial Owner](/docs/ultimate-beneficial-owner-ubo) guide.
    </Info>
  </Step>

  <Step title="Upload supporting documents [Required]">
    To upload supporting documents, use the [user document upload endpoint](/reference/applications/upload-a-document-to-support-a-users-consumer-application) for consumer programs or the [company document upload endpoint](/reference/applications/upload-a-document-to-support-a-companys-corporate-application) for corporate programs. You'll need to call the endpoint once for each document you want to upload. Rain accepts files of up to 20 megabytes, and you can find a list of [acceptable KYC documents](/docs/kyc-kyb-documents) in the documentation.
  </Step>

  <Step title="Get application updates [Optional]">
    If an application is pending, there are a few ways to stay up-to-date with their status. You can get the status of their application via API using the [user endpoint](/reference/applications/get-the-status-of-a-users-consumer-application) or the [company endpoint](/reference/applications/get-the-status-of-a-companys-corporate-application).

    Rain can also [send you a webhook](/docs/webhooks) when their application status changes. The payload will be the `userId` or `companyId` and their new status, and if they need to perform additional verification, the URL to redirect them to.

    <CodeGroup>
      ```typescript userApplicationWebhook theme={null}
      {
        resource: "user";
        action: "updated";
        body: {
          id: string;
          firstName: string;
          lastName: string;
          email: string;
          isActive: boolean;
          isTermsOfServiceAccepted: boolean;
          applicationStatus: string;
          applicationExternalVerificationLink: {
            url: string;
            params: {
              userId: string;
            };
          };
        };
      }
      ```

      ```typescript companyApplicationWebhook theme={null}
      {
        resource: "company";
        action: "updated";
        body: {
          id: string;
          name: string;
          address: string;
          applicationStatus: string;
        };
      }
      ```
    </CodeGroup>
  </Step>

  <Step title="Resubmit an application [Optional]">
    If Rain requests more information, you can update the application with the required changes. You can use these endpoints, depending on the program:

    * **Consumer program**: [Update user application](/reference/applications/update-a-users-consumer-application)
    * **Corporate program**: [Update company application](/reference/applications/update-a-companys-corporate-application) and [Update UBO application](/reference/applications/update-a-company-ubos-application)
  </Step>

  <Step title="Test different application statuses [Sandbox only]">
    As part of your integration work, you may want to test different application statuses. In the sandbox environment, Rain has added fixtures to enable this. Ensure the last name of the user contains (case-insensitive) the application status you'd like the user to have.

    For example, to ensure a user or company is approved, ensure their last name contains the string `approved`. Strings such as `TestApproved`, `PersonApproved`, or `approved` will all work. Similarly, to test the `needsVerification` status, names such as `TestNeedsVerification` or `needsverification` will work. However, `Needs Verification` will not work due to the extra whitespace.
  </Step>

  <Step title="Perform additional verification [Optional]">
    In rare cases, a user may need to perform additional verification. If their `applicationStatus` is `needsVerification`, Rain provides an additional field in the response under `applicationExternalVerificationLink`. This field is an object with a `url` key and a `params` object.

    Redirect the user to the given `url`, and pass in all `params` as query parameters. Additionally, include a `redirect` param that redirects the user back to your website.
  </Step>
</Steps>
