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

# Get a user's Bango ID (initial request)

> Resource used to Get a user's Bango ID (initial request).



## OpenAPI

````yaml /openapi/legacy/payments/merchant-to-bango/openapi.yaml post /v5/identity
openapi: 3.0.0
info:
  title: Bango Payment API v5
  description: >
    Changelog

    * 5.0.0: Initial release

    * 5.0.1: Add the CLIENT_ACTION_REQUIRED response code to the Transaction
    resource's POST method. Similar to the Identity resource's POST method, this
    lets the Bango Platform support payment routes that require user
    interactions. Currently, the only action that may be returned by the API is
    REDIRECT. Other actions may be added later.
  version: 5.0.1
servers:
  - description: SwaggerHub API Auto Mocking
    url: https://virtserver.swaggerhub.com/BangoProducts/Bango-Payment-API-v5/5.0.1
security:
  - basic: []
paths:
  /v5/identity:
    post:
      tags:
        - Identity
      summary: Get a user's Bango ID (initial request)
      description: Resource used to Get a user's Bango ID (initial request).
      operationId: IdentifyUser-initial
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdentityRequest'
      responses:
        '200':
          description: 'Transaction authorized successfully | Testing - Prefer: status=200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdentityResponse'
        '202':
          description: Request accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdentityResponse'
              examples:
                'CLIENT_ACTION_REQUIRED: REDIRECT':
                  value:
                    responseCode: CLIENT_ACTION_REQUIRED
                    responseMessage: An action is required in the client.
                    sessionId: 9c7b9891-c871-4dd5-bdcc-ac25ff2412b7
                    bangoUserId: null
                    parameters:
                      actions: REDIRECT
                      url: http://www.example.com/id?param=6bd6305c
                  description: >-
                    Testing - Prefer: status=202, preference-extension:
                    responseCode=CLIENT_ACTION_REQUIRED, action=REDIRECT
                'CLIENT_ACTION_REQUIRED: SEND_SMS':
                  value:
                    responseCode: CLIENT_ACTION_REQUIRED
                    responseMessage: An action is required in the client.
                    sessionId: 9c7b9891-c871-4dd5-bdcc-ac25ff2412b7
                    bangoUserId: null
                    parameters:
                      actions: SEND_SMS
                      shortcode: 12345
                      text: b0b5aa40-0859-4a48-adc0-95fcab1094c9
                  description: >-
                    Testing - Prefer: status=202, preference-extension:
                    responseCode=CLIENT_ACTION_REQUIRED, action=SEND_SMS
                'CLIENT_ACTION_REQUIRED: WAIT':
                  value:
                    responseCode: CLIENT_ACTION_REQUIRED
                    responseMessage: An action is required in the client.
                    sessionId: 9c7b9891-c871-4dd5-bdcc-ac25ff2412b7
                    bangoUserId: null
                    parameters:
                      actions: WAIT
                      suggestedWaitTimeMilliseconds: 3600
                  description: >-
                    Testing - Prefer: status=202, preference-extension:
                    responseCode=CLIENT_ACTION_REQUIRED, action=WAIT
                USER_CANCELLED:
                  value:
                    responseCode: USER_CANCELLED
                    responseMessage: The user cancelled the identification flow.
                    sessionId: 9c7b9891-c871-4dd5-bdcc-ac25ff2412b7
                    bangoUserId: null
                    parameters: null
                  description: >-
                    Testing - Prefer: status=202, preference-extension:
                    responseCode=USER_CANCELLED
                NOT_AVAILABLE:
                  value:
                    responseCode: NOT_AVAILABLE
                    responseMessage: No valid payment methods were found.
                    sessionId: null
                    bangoUserId: null
                    parameters: null
                  description: >-
                    Testing - Prefer: status=202, preference-extension:
                    responseCode=NOT_AVAILABLE
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                BAD_REQUEST:
                  value:
                    responseCode: BAD_REQUEST
                    responseMessage: Invalid request.
                  description: 'Testing - Prefer: status=400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                UNAUTHORIZED:
                  value:
                    responseCode: UNAUTHORIZED
                    responseMessage: Invalid access credentials.
                  description: 'Testing - Prefer: status=401'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                NOT_FOUND:
                  value:
                    responseCode: NOT_FOUND
                    responseMessage: Invalid session id or session expired.
                  description: 'Testing - Prefer: status=404'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                INTERNAL_ERROR:
                  value:
                    responseCode: INTERNAL_ERROR
                    responseMessage: The server encountered an unexpected condition.
                  description: 'Testing - Prefer: status=500'
        '502':
          description: Connect error or Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                CONNECT_ERROR:
                  value:
                    responseCode: CONNECT_ERROR
                    responseMessage: >-
                      Connection error submitting the payment request to the
                      payments provider.
                  description: >-
                    Testing - Prefer: status=502, preference-extension:
                    responseCode=CONNECT_ERROR
                FAILURE:
                  value:
                    responseCode: FAILURE
                    responseMessage: The payment provider returned an unspecified failure.
                  description: >-
                    Testing - Prefer: status=502, preference-extension:
                    responseCode=FAILURE
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                SERVICE_UNAVAILABLE:
                  value:
                    responseCode: SERVICE_UNAVAILABLE
                    responseMessage: The server is undergoing maintenance.
                  description: 'Testing - Prefer: status=503'
        '504':
          description: Connection timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                CONNECT_TIMEOUT:
                  value:
                    responseCode: CONNECT_TIMEOUT
                    responseMessage: >-
                      Connection timeout submitting the payment request to the
                      payments provider.
                  description: 'Testing - Prefer: status=504'
components:
  schemas:
    IdentityRequest:
      type: object
      properties:
        identificationMethodKey:
          type: string
          example: SOME_NETWORK_NAME
        thirdPartyUserId:
          type: string
          example: my-custom-id-123456789
        deviceCapabilitySendSms:
          type: boolean
          example: 'false'
        msisdn:
          type: string
          example: '447710900120'
        callbackUrl:
          type: string
          example: https://mystore.example.com/on-id?foo=abcde
        notificationUrl:
          type: string
          example: https://mystore.example.com/notify
        action:
          type: string
    IdentityResponse:
      required:
        - responseCode
        - responseMessage
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            sessionId:
              type: string
              example: 9c7b9891-c871-4dd5-bdcc-ac25ff2412b7
            bangoUserId:
              type: string
              example: '123456789'
            parameters:
              type: object
    Response:
      required:
        - responseCode
        - responseMessage
      type: object
      properties:
        responseCode:
          type: string
          example: OK
        responseMessage:
          type: string
          example: Success.
  securitySchemes:
    basic:
      type: http
      description: Basic authentication
      scheme: basic

````