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

# Check available payment methods

> Resource used to check available payment methods.



## OpenAPI

````yaml /openapi/legacy/payments/merchant-to-bango/openapi.yaml options /v5/transaction
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/transaction:
    options:
      tags:
        - Transaction
      summary: Check available payment methods
      description: Resource used to check available payment methods.
      operationId: Options
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionRequest'
        required: true
      responses:
        '200':
          description: >-
            Payment methods successfully identified | Testing - Prefer:
            status=200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodResponse'
        '202':
          description: Request accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodResponse'
              examples:
                NOT_AVAILABLE:
                  value:
                    responseCode: NOT_AVAILABLE
                    responseMessage: No valid payment methods were found.
                  description: >-
                    Testing - Prefer: status=202, preference-extension:
                    responseCode=NOT_AVAILABLE
                PRICE_NOT_SUPPORTED:
                  value:
                    responseCode: PRICE_NOT_SUPPORTED
                    responseMessage: Price not supported on suggested payment methods.
                    description: >-
                      Testing - Prefer: status=202, preference-extension:
                      responseCode=PRICE_NOT_SUPPORTED
                USER_EXCEEDED_LIMIT:
                  value:
                    responseCode: USER_EXCEEDED_LIMIT
                    responseMessage: User exceeded limit on suggested payment methods.
                  description: >-
                    Testing - Prefer: status=202, preference-extension:
                    responseCode=USER_EXCEEDED_LIMIT
        '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, preference-extension:
                    responseCode=BAD_REQUEST
                INVALID_BANGOUSERID:
                  value:
                    responseCode: INVALID_BANGOUSERID
                    responseMessage: Invalid bangoUserId.
                  description: >-
                    Testing - Prefer: status=400, preference-extension:
                    responseCode=INVALID_BANGOUSERID
        '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'
        '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'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              example:
                SERVICE_UNAVAILABLE:
                  value:
                    responseCode: SERVICE_UNAVAILABLE
                    responseMessage: The server is undergoing maintenance.
                  description: 'Testing - Prefer: status=503'
components:
  schemas:
    TransactionRequest:
      required:
        - paymentItems
        - bangoUserId
      type: object
      properties:
        bangoUserId:
          type: string
          example: '987654321'
          description: >-
            The Bango User ID of the user purchasing the item. Required to allow
            for per-user payment methods, and to check whether the user is
            permitted to purchase the item.
        paymentMethods:
          type: array
          items:
            type: string
            example: OPERATORBILLING
            description: >-
              Payment method type strings. If specified, defines the subset of
              supported payment methods you would like the Bango Platform to
              consider including in the response. If omitted, or if empty, the
              Bango Platform considers all supported payment methods. The
              currently supported payment method type strings are
              OPERATORBILLING and INTERNET.
        externalTransactionId:
          type: string
          example: my-tx-id-12345
          description: >-
            Your own unique, persistent transaction ID, if you have one. This
            helps reconciliation processes. Required to use the Bango Platform
            idempotency feature.
        paymentItems:
          $ref: '#/components/schemas/PaymentItem'
        extensionData:
          $ref: '#/components/schemas/ExtensionData'
    PaymentMethodResponse:
      required:
        - responseCode
        - responseMessage
      type: object
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            availablePaymentMethods:
              description: >-
                An array of objects, where each object has a number of
                properties.  - type is a valid payment method type string, for
                example OPERATORBILLING - key is an identifier for the payment
                provider - description is a string you can show in the store's
                user interface to describe the payment method - parameters is an
                object of parameters applicable to the payment provider

                The same value of type may appear more than once in the array,
                in this case, the value of key distinguishes the different
                methods. If paymentMethods was included in the request, then
                type is always one of the strings specified in that array.
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    example: OPERATORBILLING
                  key:
                    type: string
                    example: SOME_NETWORK_NAME
                  description:
                    type: string
                    example: Direct operator billing
                  parameters:
                    type: object
    Response:
      required:
        - responseCode
        - responseMessage
      type: object
      properties:
        responseCode:
          type: string
          example: OK
        responseMessage:
          type: string
          example: Success.
    PaymentItem:
      description: >-
        The item to be purchased. See Bango Payment API / API reference /
        Transaction Payment Items structure for information about this
        structure. Required to check whether the user is permitted to purchase
        the item, and to to check whether the prices are supported price points
        for the payment provider.
      type: array
      items:
        type: object
        properties:
          itemName:
            type: string
            example: My item
          itemDescription:
            type: string
            example: My item description
          itemCategory:
            type: string
            example: '1'
          externalPaymentItemId:
            type: string
            example: abcd-1234
          submerchantReferenceKey:
            type: string
            example: submerchant1
          priceList:
            $ref: '#/components/schemas/PriceList'
    ExtensionData:
      description: Additional data related to the transaction.
      type: object
      properties:
        some:
          type: string
          example: 123-456-789
        some1:
          type: string
          example: 123-456-789
    PriceList:
      type: array
      items:
        $ref: '#/components/schemas/Price'
    Price:
      type: object
      properties:
        grossAmount:
          type: string
          example: '3.99'
        currencyIso3:
          type: string
          example: USD
        financialBreakdown:
          $ref: '#/components/schemas/FinancialBreakdown'
    FinancialBreakdown:
      type: object
      properties:
        taxAmount:
          type: string
          example: '0'
  securitySchemes:
    basic:
      type: http
      description: Basic authentication
      scheme: basic

````