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

# Create a consumer application for a user

> Creates a consumer application for a user. Can be used directly without calling the initiate endpoint first. Identity verification is handled through Sumsub share token, Persona share token, or by providing personal information through the API. The application goes through KYC review once created.



## OpenAPI

````yaml post /issuing/applications/user
openapi: 3.0.3
info:
  title: Issuing API
  description: This is the specification for Rain's Issuing API.
  termsOfService: https://www.rain.xyz/legal/authorized-user-terms
  contact:
    email: support@rain.xyz
  version: 1.3.0
servers:
  - url: https://api-dev.rain.xyz/v1
    description: Sandbox server
  - url: https://api.rain.xyz/v1
    description: Production server
security: []
tags:
  - name: paymentRoutes
    description: >-
      **Endpoint Migration:** The `/v1/automations` endpoints have been renamed
      to `/v1/payment-routes`. The old `/v1/automations` paths remain available
      as deprecated aliases during migration. Update your integrations to use
      `/v1/payment-routes` as the deprecated endpoints will be removed in a
      future release.
  - name: simulate
    description: >-
      Transaction simulation endpoints for testing integration flows in
      non-production environments. These endpoints let you trigger transaction
      events programmatically to automate integration tests and verify webhook
      handling without depending on external systems or staging real deposits.
      **Sandbox only** — all simulation endpoints return `404 Not Found` in
      production.
  - name: raindrops
    description: >-
      Rewards and points management endpoints. Custom API keys need
      `raindrops:read`/`raindrops:write` for general rewards endpoints and
      `raindrops-travel:read`/`raindrops-travel:write` for travel redemption
      endpoints.
    x-group: rewards
paths:
  /issuing/applications/user:
    post:
      tags:
        - applications
      summary: Create a consumer application for a user
      description: >-
        Creates a consumer application for a user. Can be used directly without
        calling the initiate endpoint first. Identity verification is handled
        through Sumsub share token, Persona share token, or by providing
        personal information through the API. The application goes through KYC
        review once created.
      operationId: createIssuingUserApplication
      requestBody:
        description: Application information for this user
        content:
          application/json:
            schema:
              allOf:
                - oneOf:
                    - $ref: '#/components/schemas/IssuingApplicationPerson'
                      title: Using API
                    - title: Using Sumsub Share Token
                      type: object
                      required:
                        - sumsubShareToken
                      properties:
                        sumsubShareToken:
                          type: string
                          description: A Sumsub share token
                        sumsubShareTokenMode:
                          type: string
                          enum:
                            - reusableKyc
                            - sumsubIdConnect
                            - copyApplicant
                          description: >-
                            The share token processing mode. Use `reusableKyc`
                            or `sumsubIdConnect` to leverage portable
                            verification where the user verified once through a
                            portable identity. Use `copyApplicant` to maintain
                            backward compatibility with the existing applicant
                            copy flow. If not specified, defaults to the legacy
                            applicant copy behavior.
                    - title: Using Persona Share Token
                      type: object
                      required:
                        - personaShareToken
                      properties:
                        personaShareToken:
                          type: string
                          description: The Persona inquiry ID
                - type: object
                  description: >-
                    The user looking to create an account - they must have a
                    wallet, and their wallet will be an owner on their Rain
                    smart contract
                  required:
                    - ipAddress
                    - occupation
                    - annualSalary
                    - accountPurpose
                    - expectedMonthlyVolume
                  properties:
                    walletAddress:
                      type: string
                      pattern: ^0x[0-9a-fA-F]{40}$
                      description: >-
                        This user's EVM address; either walletAddress or
                        solanaAddress or stellarAddress is required if using a
                        Rain-managed solution, but not required otherwise
                    solanaAddress:
                      type: string
                      pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
                      description: >-
                        This user's Solana address; either walletAddress or
                        solanaAddress or stellarAddress is required if using a
                        Rain-managed solution, but not required otherwise
                    stellarAddress:
                      type: string
                      pattern: ^[GC][A-Z2-7]{55}$|^M[A-Z2-7]{68}$
                      description: >-
                        This user's Stellar address; either walletAddress or
                        solanaAddress or stellarAddress is required if using a
                        Rain-managed solution, but not required otherwise
                    chainId:
                      type: string
                      description: >-
                        If using external collateral contracts, the chain id of
                        the user's external collateral contract; not required if
                        using Rain's collateral contracts
                    contractAddress:
                      $ref: '#/components/schemas/EvmOrSolanaWalletAddress'
                      description: >-
                        If using external collateral contracts, the address of
                        the user's external collateral contract; not required if
                        using Rain's collateral contracts
                    sourceKey:
                      type: string
                      minLength: 1
                      maxLength: 24
                      description: Unique identifier for where this user is coming from
                    externalId:
                      type: string
                      minLength: 1
                      maxLength: 255
                      description: >-
                        An optional tenant-defined identifier for this user.
                        Must be unique within the tenant.
                    ipAddress:
                      type: string
                      description: This user's IP address
                    occupation:
                      type: string
                      description: The user's occupation
                    annualSalary:
                      type: string
                      description: The user's annual salary
                    accountPurpose:
                      type: string
                      description: The purpose of the user's account
                    expectedMonthlyVolume:
                      type: string
                      description: The amount of money the user expects to spend each month
                    isTermsOfServiceAccepted:
                      type: boolean
                      description: >-
                        Optional. Whether the user has accepted the terms of
                        service. If omitted, this defaults to true server-side.
                      enum:
                        - true
                    hasExistingDocuments:
                      type: boolean
                      description: >-
                        Whether or not to use existing documents for additional
                        verification
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingUser'
        '400':
          description: Invalid request
        '401':
          description: Invalid authorization
        '500':
          description: Internal server error
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: bash
          label: Using API
          source: |-
            curl --request POST \
              --url https://api.rain.xyz/v1/issuing/applications/user \
              --header 'Api-Key: YOUR_API_KEY' \
              --header 'Content-Type: application/json' \
              --data '{
              "firstName": "John",
              "lastName": "Doe",
              "birthDate": "2000-01-01",
              "nationalId": "123456789",
              "countryOfIssue": "US",
              "email": "john.doe@example.com",
              "phoneCountryCode": "1",
              "phoneNumber": "5555555555",
              "address": {
                "line1": "123 Main St",
                "city": "New York",
                "region": "NY",
                "postalCode": "10001",
                "countryCode": "US"
              },
              "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
              "ipAddress": "192.168.1.1",
              "occupation": "Software Developers",
              "annualSalary": "100000",
              "accountPurpose": "Personal spending",
              "expectedMonthlyVolume": "5000"
            }'
        - lang: bash
          label: Using Sumsub Share Token
          source: |-
            curl --request POST \
              --url https://api.rain.xyz/v1/issuing/applications/user \
              --header 'Api-Key: YOUR_API_KEY' \
              --header 'Content-Type: application/json' \
              --data '{
              "sumsubShareToken": "your_sumsub_share_token",
              "sumsubShareTokenMode": "reusableKyc",
              "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
              "ipAddress": "192.168.1.1",
              "occupation": "Software Developers",
              "annualSalary": "100000",
              "accountPurpose": "Personal spending",
              "expectedMonthlyVolume": "5000"
            }'
        - lang: bash
          label: Using Persona Share Token
          source: |-
            curl --request POST \
              --url https://api.rain.xyz/v1/issuing/applications/user \
              --header 'Api-Key: YOUR_API_KEY' \
              --header 'Content-Type: application/json' \
              --data '{
              "personaShareToken": "your_persona_inquiry_id",
              "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
              "ipAddress": "192.168.1.1",
              "occupation": "Software Developers",
              "annualSalary": "100000",
              "accountPurpose": "Personal spending",
              "expectedMonthlyVolume": "5000"
            }'
components:
  schemas:
    IssuingApplicationPerson:
      type: object
      required:
        - firstName
        - lastName
        - birthDate
        - nationalId
        - countryOfIssue
        - email
        - address
      properties:
        id:
          type: string
          format: uuid
          description: >-
            The initiated application's Rain ID, if an application was
            previously initiated for this user
        firstName:
          type: string
          maxLength: 50
          description: The person's first name
        lastName:
          type: string
          maxLength: 50
          description: The person's last name
        birthDate:
          type: string
          format: date
          example: '2000-01-01'
          description: The person's birth date
        nationalId:
          type: string
          description: The person's national id, 9-digit SSN if country of issue is US
        countryOfIssue:
          $ref: '#/components/schemas/CountryCode'
          description: The person's country of issue of their national id
        email:
          type: string
          description: The person's email address
        phoneCountryCode:
          type: string
          minLength: 1
          maxLength: 3
          pattern: ^[0-9]+$
          example: '1'
          description: The user's phone country code
        phoneNumber:
          type: string
          minLength: 1
          maxLength: 15
          pattern: ^[0-9]+$
          example: '5555555555'
          description: The user's phone number
        address:
          $ref: '#/components/schemas/PhysicalAddress'
          description: The person's address
    EvmOrSolanaWalletAddress:
      type: string
      pattern: ^(0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
    IssuingUser:
      allOf:
        - type: object
          required:
            - id
            - firstName
            - lastName
            - email
            - isActive
          properties:
            id:
              type: string
              description: The user's unique identifier
              format: uuid
            companyId:
              type: string
              description: The id of the company that the user belongs to, if any
              format: uuid
            externalId:
              type: string
              minLength: 1
              maxLength: 255
              description: >-
                An optional tenant-defined identifier for this user. Must be
                unique within the tenant.
            sourceKey:
              type: string
              minLength: 1
              maxLength: 24
              description: The source key associated with the user's team
            firstName:
              type: string
              maxLength: 50
              description: The user's first name
            lastName:
              type: string
              maxLength: 50
              description: The user's last name
            email:
              type: string
              description: The user's email address
            isActive:
              type: boolean
              description: Whether the user is active
            address:
              $ref: '#/components/schemas/PhysicalAddress'
              description: The user's physical address
            phoneCountryCode:
              type: string
              minLength: 1
              maxLength: 3
              pattern: ^[0-9]+$
              example: '1'
              description: The user's phone country code
            phoneNumber:
              type: string
              minLength: 1
              maxLength: 15
              pattern: ^[0-9]+$
              example: '5555555555'
              description: The user's phone number
            walletAddress:
              type: string
              description: The user's EVM wallet address
            solanaAddress:
              type: string
              pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
              description: The user's Solana wallet address
            createdAt:
              type: string
              format: date-time
              description: When the user was created
            updatedAt:
              type: string
              format: date-time
              description: When the user was last updated
        - $ref: '#/components/schemas/IssuingApplication'
    CountryCode:
      type: string
      minLength: 2
      maxLength: 2
    PhysicalAddress:
      type: object
      required:
        - line1
        - city
        - region
        - postalCode
        - countryCode
      properties:
        line1:
          type: string
          maxLength: 100
        line2:
          type: string
          maxLength: 100
        city:
          type: string
          maxLength: 50
        region:
          type: string
          maxLength: 50
        postalCode:
          type: string
          minLength: 1
          maxLength: 15
          pattern: ^[a-zA-Z0-9 -]{1,15}$
        countryCode:
          $ref: '#/components/schemas/CountryCode'
        country:
          type: string
          maxLength: 50
    IssuingApplication:
      type: object
      required:
        - applicationStatus
      properties:
        applicationStatus:
          $ref: '#/components/schemas/ApplicationStatus'
        applicationExternalVerificationLink:
          type: object
          description: The link to the external verification page for the application
          deprecated: true
          required:
            - url
          properties:
            url:
              type: string
              format: uri
            params:
              type: object
              properties:
                userId:
                  type: string
                  format: uuid
        applicationCompletionLink:
          type: object
          description: The link to the completion page for the application
          required:
            - url
          properties:
            url:
              type: string
              format: uri
            params:
              type: object
              properties:
                userId:
                  type: string
                  format: uuid
        applicationReason:
          type: string
          description: The reason for the application status
    ApplicationStatus:
      type: string
      enum:
        - approved
        - pending
        - needsInformation
        - needsVerification
        - manualReview
        - denied
        - locked
        - canceled
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: Api-Key
      in: header

````