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

# Vend betting via sub account (v1)

> **Deprecated.** This endpoint is deprecated and will be removed in a future release. Use `POST /v2/bill/betting/{subAccountId}` instead.

<Warning>
  This endpoint is deprecated. Use [Vend betting via sub account (v2)](/nomba-api-reference/bills/pay-for-betting-via-sub-account-v2) at `POST /v2/bill/betting/{subAccountId}` instead.
</Warning>

<Warning>
  Always requery the transaction using [Fetch a single transaction on a sub account](/nomba-api-reference/requery/fetch-a-single-transaction-on-a-sub-account) to confirm its final status before issuing a refund.
</Warning>


## OpenAPI

````yaml post /v1/bill/betting/{subAccountId}
openapi: 3.0.1
info:
  description: ''
  title: Vendor API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.nomba.com
  - description: Sandbox
    url: https://sandbox.nomba.com
security: []
tags:
  - name: Authenticate
  - name: Accounts
  - name: Virtual Accounts
  - name: Online Checkout
  - name: Charge
  - name: Transfers
  - name: Direct Debits
  - name: Terminals
  - name: Transactions
  - name: Airtime and Data Vending
  - name: Electricity Vending
  - name: CableTV Subscription
  - name: Betting Vending
paths:
  /v1/bill/betting/{subAccountId}:
    post:
      tags:
        - Betting Vending
      summary: Vend betting via a specific account
      description: >-
        **Deprecated.** This endpoint is deprecated and will be removed in a
        future release. Use `POST /v2/bill/betting/{subAccountId}` instead.
      operationId: Vend betting via a sub account
      parameters:
        - description: The parent accountId of the business.
          in: header
          name: accountId
          schema:
            type: string
            format: uuid
            example: 890022ce-bae0-45c1-9b9d-ee7872e6ca27
          required: true
        - description: >-
            The identifier for the account through which this transaction is to
            be carried out.
          example: 2242b79d-f2cf-4ccc-ada1-e890bd1a9f0d
          in: path
          name: subAccountId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BettingVendingRequest'
        description: The request payload required to vend betting
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: '00'
                    description: Response Code
                  description:
                    type: string
                    example: Success
                    description: Response description
                  data:
                    $ref: '#/components/schemas/BettingVendingResponse'
                required:
                  - code
                  - description
                  - data
          description: OK - your request was successful.
          headers:
            X-Rate-Limit-Limit:
              description: The number of allowed requests in the current period
              schema:
                type: string
                example: '40'
            X-Rate-Limit-Remaining:
              description: The number of remaining requests in the current period
              schema:
                type: string
                example: '39'
            X-Rate-Limit-Window:
              description: The specified rate limit window
              schema:
                type: string
                example: 1s
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestError'
          description: The request body sent by merchant did not pass the validation checks
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
          description: >-
            The access_token provided to access the resource is missing or
            invalid.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizationError'
          description: The client does not have the permissions to access this resource
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordNotFoundError'
          description: The record that the client is trying to access does not exist.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
          description: >-
            The client has maxed out the number of calls within a time period on
            this resource.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
          description: Downstream system error.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestError'
          description: Resource not available
      deprecated: true
      security:
        - BearerAuth: []
components:
  schemas:
    BettingVendingRequest:
      type: object
      properties:
        bettingProvider:
          type: string
          example: bet9ja
        merchantTxRef:
          type: string
          description: This is an idempotency key and must be unique per transaction.
          example: '12345'
        phoneNumber:
          type: string
          example: '09012345678'
        payerName:
          type: string
          example: John Doe
        amount:
          type: integer
          example: 1000
        customerId:
          type: string
          example: customer123
    BettingVendingResponse:
      type: object
      properties:
        amount:
          type: number
          format: double
          description: The value (in digits) of this transaction
          example: 2000
        timeCreated:
          type: string
          description: The Date and Time of transaction creation
          format: date-time
          example: '2023-09-04T07:09:06.900Z'
        type:
          type: string
          description: The classification for this type of transaction
          example: phcn
        meta:
          type: object
          description: Extra information about this transaction
          example:
            merchantTxRef: test1116
            rrn: '240626232937'
            api_client_id: 123456-9100-4e66-93e1-7f6da894ef89
            api_account_id: 0167288-d989-460a-bbde-9842f2b4320f
        status:
          type: string
          description: >-
            The status of this transaction. `SUCCESS` means it completed;
            `PROCESSING` means it is still being processed — listen for the
            webhook or requery the transaction for the final status.
          enum:
            - SUCCESS
            - PROCESSING
          example: SUCCESS
        id:
          type: string
          description: >-
            The unique ID of the transaction, e.g.
            `API-BETTING-4B8C8-dcc5994c-e110-4035-9017-fc6e497a3baa`. Use it to
            requery the transaction.
          example: API-BETTING-4B8C8-dcc5994c-e110-4035-9017-fc6e497a3baa
        fee:
          type: string
          description: The associated transaction fee
          example: '0.0'
      required:
        - amount
        - timeCreated
        - type
        - status
        - meta
        - id
    RequestError:
      type: object
      description: Request Error response.
      properties:
        code:
          type: string
          description: API error code.
          example: '400'
        description:
          type: string
          description: Additional details about the error.
          example: Request failed.
    AuthenticationError:
      type: object
      description: Authentication Error response.
      properties:
        code:
          type: string
          description: API error code.
          example: '401'
        description:
          type: string
          description: Additional details about the error.
          example: Unauthorized
    AuthorizationError:
      type: object
      description: Permissions error response.
      properties:
        code:
          type: string
          description: API error code.
          example: '403'
        description:
          type: string
          description: Additional details about the error.
          example: Forbidden
    RecordNotFoundError:
      type: object
      description: Record-Not-Found error response.
      properties:
        code:
          type: string
          description: API error code.
          example: '404'
        description:
          type: string
          description: Additional details about the error.
          example: Record not found
    RateLimitError:
      type: object
      description: Rate-limit error response.
      properties:
        code:
          type: string
          description: API error code.
          example: '429'
        description:
          type: string
          description: Additional details about the error.
          example: Too many requests
    ServerError:
      type: object
      description: Server error response.
      properties:
        code:
          type: string
          description: API error code.
          example: '500'
        description:
          type: string
          description: Additional details about the error.
          example: Server error
  securitySchemes:
    BearerAuth:
      description: >-
        Nomba authenticates API calls with [OAuth2 HTTP bearer
        tokens](http://tools.ietf.org/html/rfc6750). There are two methods of
        authentication; [Client-Credentials
        method](https://www.rfc-editor.org/rfc/rfc6749) and [PKCE (Proof Key for
        Code Exchange)](https://www.rfc-editor.org/rfc/rfc7636) method. In each
        of the methods, You will get an `ACCESS_TOKEN`. You need to use an
        `"Authorization"` HTTP header to provide your `ACCESS_TOKEN`. For
        example: `Authorization: {ACCESS_TOKEN}`.
      scheme: bearer
      type: http
      bearerFormat: JWT

````