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

# Inquiry Prepaid (v3)

> Inquiry for prepaid products that need one before payment: PLN Token (plntok) and Game Top Up (topupg). Direct-payment commands (pulsa, data, vouchg, strmg, emoney, ewallet, cashwd) have no inquiry step — call prepaid/payment directly; inquiry for them returns 98. The flow follows the flat category payment_type_detail (see list-product-category). The product is validated against the flat category of `command` (inactive product/category → 06). For topupg, call prepaid/get-parameter-game-topup first to know which of server_id / username the game needs. The returned reference_number is cached for 15 minutes.



## OpenAPI

````yaml https://biller-b2b.singapay.id/docs post /api/v3/prepaid/inquiry
openapi: 3.0.0
info:
  title: B2B Biller API
  description: >-
    API documentation for the B2B Biller service. Provides endpoints for bill
    payments (postpaid/prepaid), transaction management, balance checking, and
    authentication.
  version: 1.0.0
servers:
  - url: https://sandbox-biller-b2b.singapay.id
    description: Sandbox
  - url: https://biller-b2b.singapay.id
    description: Production
security: []
tags:
  - name: Authentication
    description: OAuth2 token generation
  - name: General
    description: Bill transaction listing, detail, balance, and utilities
  - name: Postpaid V1
    description: Postpaid bill inquiry and payment (V1)
  - name: Prepaid V1
    description: Prepaid inquiry and payment — PLN Token, Pulsa, Paket Data (V1)
  - name: Postpaid V2
    description: Postpaid bill inquiry and payment (V2)
  - name: Prepaid V2
    description: Prepaid inquiry, payment, and game topup (V2)
  - name: Postpaid V3
    description: >-
      Postpaid bill inquiry and payment with flat category validation (V3) —
      adds educ, prop, pbb
  - name: Prepaid V3
    description: >-
      Prepaid inquiry, payment, and game topup with flat category validation
      (V3) — adds strmg, emoney, ewallet, cashwd
  - name: Product V3
    description: >-
      Product, flat category, synthetic category tree, and product config
      listing (V3)
  - name: General V3
    description: >-
      Transaction detail with flat category (V3). check-balance,
      list-bill-transaction and list-bill-statement stay on v1;
      reset-customer-id has no version (/api/reset-customer-id).
paths:
  /api/v3/prepaid/inquiry:
    post:
      tags:
        - Prepaid V3
      summary: Inquiry Prepaid (v3)
      description: >-
        Inquiry for prepaid products that need one before payment: PLN Token
        (plntok) and Game Top Up (topupg). Direct-payment commands (pulsa, data,
        vouchg, strmg, emoney, ewallet, cashwd) have no inquiry step — call
        prepaid/payment directly; inquiry for them returns 98. The flow follows
        the flat category payment_type_detail (see list-product-category). The
        product is validated against the flat category of `command` (inactive
        product/category → 06). For topupg, call
        prepaid/get-parameter-game-topup first to know which of server_id /
        username the game needs. The returned reference_number is cached for 15
        minutes.
      operationId: prepaidInquiryV3
      parameters:
        - name: X-PARTNER-ID
          in: header
          description: Your unique partner API key
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          required: true
          schema:
            type: string
            default: application/json
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - command
                - data
              properties:
                command:
                  description: Biller command (plntok→PLNTOK, topupg→TOPUPG)
                  type: string
                  enum:
                    - plntok
                    - topupg
                  example: plntok
                data:
                  required:
                    - customer_id
                    - product_code
                  properties:
                    customer_id:
                      description: Meter number (plntok) or game user ID (topupg)
                      type: string
                      example: '14051688338'
                    product_code:
                      description: Product code (must exist in products table)
                      type: string
                      example: SPPLNTOK50
                    server_id:
                      description: Game server ID (topupg, game dependent)
                      type: string
                      nullable: true
                    username:
                      description: Game username (topupg, game dependent)
                      type: string
                      nullable: true
                    platform:
                      description: Game platform (topupg); default android
                      type: string
                      example: android
                      nullable: true
                  type: object
              type: object
            examples:
              PLN Token:
                summary: plntok
                value:
                  command: plntok
                  data:
                    customer_id: '14051688338'
                    product_code: SPPLNTOK50
              Mobile Legends:
                summary: topupg — MLTP needs server_id
                value:
                  command: topupg
                  data:
                    customer_id: '12345678'
                    product_code: SPGTML5D
                    server_id: '2001'
              Free Fire:
                summary: topupg — FFTP needs no server_id
                value:
                  command: topupg
                  data:
                    customer_id: '987654321'
                    product_code: <FFTP product code>
      responses:
        '200':
          description: Inquiry successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrepaidInquiryV3Response'
              examples:
                PLN Token Success:
                  summary: plntok
                  value:
                    command: plntok
                    response_code: '00'
                    response_text: Inquiry success
                    data:
                      customer_name: JOHN DOE
                      reference_number: SPPLNTOK50RJBL00961254684561749552869
                      amount: '50000'
                      price: '52500'
                      created_at: '2026-08-20 13:27:31'
                Game Top Up Success:
                  summary: topupg (customer_name = in-game username)
                  value:
                    command: topupg
                    response_code: '00'
                    response_text: Inquiry success
                    data:
                      customer_name: PlayerOne
                      reference_number: SPGTML5DALTR00123456781761806200
                      amount: '1500'
                      price: '1450'
                      created_at: '2026-08-20 13:50:00'
        '400':
          description: >-
            Product exists but is not prepaid, not in the flat category of
            `command`, or the command is unknown (06)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillerErrorV3Response'
              example:
                command: topupg
                response_code: '06'
                response_text: Product ID SPPLNTOK50 is not classified as a `topupg` product.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: >-
            Product has no flat category, product/flat category inactive, or
            merchant biller data not found (06). A product_code that does not
            exist fails validation (04, 422).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillerErrorV3Response'
              example:
                command: plntok
                response_code: '06'
                response_text: 'Product SPPLNTOK50 is not available: product is inactive'
        '422':
          description: >-
            Validation error (04), or the product category is
            prepaid-without-inquiry (98: "This product does not use inquiry,
            call prepaid/payment directly")
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: System error (99)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillerErrorV3Response'
      security:
        - bearerAuth: []
components:
  schemas:
    PrepaidInquiryV3Response:
      description: V3 prepaid inquiry success response (plntok, topupg). Same shape as V2.
      properties:
        command:
          type: string
          example: plntok
        response_code:
          type: string
          example: '00'
        response_text:
          type: string
          example: Inquiry success
        data:
          properties:
            customer_name:
              description: Meter owner (plntok) or in-game username (topupg)
              type: string
              example: JOHN DOE
              nullable: true
            reference_number:
              description: Send this to prepaid/payment within 15 minutes; usable once
              type: string
              example: SPPLNTOK50RJBL00961254684561749552869
            amount:
              description: Product amount/denomination
              type: string
              example: '50000'
            price:
              description: >-
                Amount to be deducted from the merchant balance (deposit_price
                for deposit merchants, else settlement_price)
              type: string
              example: '52500'
            created_at:
              type: string
              example: '2026-08-20 13:27:31'
          type: object
          additionalProperties: true
      type: object
    BillerErrorV3Response:
      description: >-
        V3 biller error response. Common codes: 04 invalid argument / wrong
        password / missing reference_number (422), payment product_code or
        customer_id differ from the inquiry (400), 06 product not found, product
        or flat category inactive, reference_number used or expired (404) — or
        product not in the flat category of the command / wrong payment type /
        unknown command (400), 16 credential not found (422), 17 insufficient
        balance (400), 22/89 vendor error (503), 99 internal error (500). Full
        list: docs/feature-flow/RESPONSE_CODE_ALL.md.
      required:
        - command
        - response_code
        - response_text
      properties:
        command:
          type: string
          example: plnpos
        response_code:
          description: Error code (see schema description)
          type: string
          example: '06'
        response_text:
          type: string
          example: 'Product SPPLNPOS is not available: product is inactive'
      type: object
    UnauthorizedErrorResponse:
      description: Unauthorized error response (HTTP 401)
      required:
        - status
        - success
        - error
      properties:
        status:
          type: integer
          example: 401
        success:
          type: boolean
          example: false
        error:
          properties:
            code:
              type: integer
              example: 401
            message:
              type: string
              example: Unauthorized merchant, please sign in
          type: object
      type: object
    ValidationErrorResponse:
      description: Validation error response (HTTP 422)
      required:
        - command
        - response_code
        - response_text
        - data
      properties:
        command:
          type: string
          example: detail-bill-transaction
        response_code:
          type: string
          example: '04'
        response_text:
          type: string
          example: Rejected Format Error
        data:
          description: Field-level error messages
          type: object
          example:
            data: The data field is required.
            data.transaction_id: The data.transaction id field is required.
          additionalProperties:
            type: string
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      description: JWT Bearer token obtained from /api/v1.0/access-token/b2b
      bearerFormat: JWT
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.