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

# Pay a cable TV subscription

> Debits the merchant balance and pays a cable TV subscription. `amount` is in naira. Requires the `invoice:write` scope.



## OpenAPI

````yaml /openapi.json post /v1/vas/cabletv
openapi: 3.1.0
info:
  title: Duro API
  version: 1.0.0
  description: >-
    Recovery-first subscription billing. Authenticate with a secret key
    (sk_test_ / sk_live_) as a bearer token. Amounts are in integer minor units
    (kobo).
servers:
  - url: https://api.useduro.com
    description: >-
      One base URL for both modes. The key prefix selects the mode: sk_test_… is
      test, sk_live_… is live. You never switch hosts or pass a mode parameter.
security:
  - bearerAuth: []
tags:
  - name: Plans
  - name: Promo Codes
  - name: Payment Links
  - name: Customers
  - name: Transactions
  - name: Subscriptions
  - name: Invoices
  - name: Recovery
  - name: Settings
  - name: Analytics
  - name: Checkout
  - name: Events
  - name: Merchant Balance
  - name: Payouts
  - name: VAS
  - name: OAuth
paths:
  /v1/vas/cabletv:
    post:
      tags:
        - VAS
      summary: Pay a cable TV subscription
      description: >-
        Debits the merchant balance and pays a cable TV subscription. `amount`
        is in naira. Requires the `invoice:write` scope.
      operationId: buyCable
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CablePurchase'
      responses:
        '201':
          description: Bill transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillTransaction'
        '422':
          $ref: '#/components/responses/Validation'
components:
  schemas:
    CablePurchase:
      type: object
      required:
        - cableTvType
        - customerId
        - payerName
        - amount
      properties:
        cableTvType:
          type: string
          enum:
            - dstv
            - gotv
            - startimes
        customerId:
          type: string
          description: The smartcard/IUC number.
        payerName:
          type: string
          example: Ada Lovelace
        amount:
          type: integer
          description: Naira (1 to 500,000).
          example: 19000
    BillTransaction:
      type: object
      properties:
        id:
          type: string
        category:
          type: string
          enum:
            - airtime
            - data
            - betting
            - cabletv
            - electricity
        provider:
          type: string
        recipient:
          type: string
        amount:
          type: integer
          description: Minor units (kobo).
        currency:
          type: string
        status:
          type: string
          enum:
            - success
            - processing
            - failed
        reference:
          type: string
        nombaReference:
          type: string
          nullable: true
        meta:
          type: object
          nullable: true
          description: Provider metadata, e.g. a prepaid electricity token.
        createdAt:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: array
              items:
                type: object
  responses:
    Validation:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Paste your secret key as the bearer token: sk_test_… (test) or sk_live_…
        (live). That is all a normal API call needs. OAuth access tokens from
        POST /v1/oauth/token also work, but a client id/secret is only for
        platforms acting on another tenant's behalf, not for your own
        integration.

````