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

# Payment Prepaid (v3)

> Execute payment for prepaid products (V3). Two flows: inquiry-based (plntok, topupg) where reference_number from prepaid/inquiry is required, and direct payment (pulsa, data, vouchg + V3-only strmg, emoney, ewallet, cashwd) with no inquiry. customer_id format: phone number `^08[0-9]{8,15}$` for pulsa, data, ewallet, cashwd; card number `^[0-9]{10,20}$` for emoney. The product is validated against the flat category of `command`; an inactive product or flat category is rejected with 06. response_code 00 = success at vendor, 01 = pending; the final status (success/refund) is sent via callback.



## OpenAPI

````yaml https://biller-b2b.singapay.id/docs post /api/v3/prepaid/payment
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/payment:
    post:
      tags:
        - Prepaid V3
      summary: Payment Prepaid (v3)
      description: >-
        Execute payment for prepaid products (V3). Two flows: inquiry-based
        (plntok, topupg) where reference_number from prepaid/inquiry is
        required, and direct payment (pulsa, data, vouchg + V3-only strmg,
        emoney, ewallet, cashwd) with no inquiry. customer_id format: phone
        number `^08[0-9]{8,15}$` for pulsa, data, ewallet, cashwd; card number
        `^[0-9]{10,20}$` for emoney. The product is validated against the flat
        category of `command`; an inactive product or flat category is rejected
        with 06. response_code 00 = success at vendor, 01 = pending; the final
        status (success/refund) is sent via callback.
      operationId: prepaidPaymentV3
      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, mapped 1:1 to a flat category (pulsa→PULSA,
                    data→DATA, plntok→PLNTOK, topupg→TOPUPG, vouchg→VOUCHG,
                    strmg→STRMG, emoney→EMONEY, ewallet→EWALLET, cashwd→CASHWD)
                  type: string
                  enum:
                    - pulsa
                    - data
                    - plntok
                    - topupg
                    - vouchg
                    - strmg
                    - emoney
                    - ewallet
                    - cashwd
                  example: pulsa
                data:
                  required:
                    - product_code
                    - password
                    - customer_id
                  properties:
                    product_code:
                      type: string
                      example: SPTLKMAS10
                    password:
                      description: Merchant biller password
                      type: string
                    customer_id:
                      description: >-
                        Phone number, meter number, card number, or game user ID
                        depending on command
                      type: string
                      example: '08123456789'
                    reference_number:
                      description: >-
                        reference_number from prepaid/inquiry — required for
                        plntok and topupg, ignored otherwise
                      type: string
                      nullable: true
                  type: object
              type: object
            examples:
              Pulsa:
                summary: pulsa — direct
                value:
                  command: pulsa
                  data:
                    product_code: SPTLKMAS10
                    password: your_merchant_biller_password
                    customer_id: '08123456789'
              Paket Data:
                summary: data — direct
                value:
                  command: data
                  data:
                    product_code: SPDXLXML10G
                    password: your_merchant_biller_password
                    customer_id: '08123456789'
              Voucher Game:
                summary: vouchg — direct
                value:
                  command: vouchg
                  data:
                    product_code: <VOUCHG product code>
                    password: your_merchant_biller_password
                    customer_id: '08123456789'
              Streaming:
                summary: strmg — direct (V3 only)
                value:
                  command: strmg
                  data:
                    product_code: SPOTIFY1M
                    password: your_merchant_biller_password
                    customer_id: '08123456789'
              E-Money:
                summary: emoney — direct, customer_id = card number (V3 only)
                value:
                  command: emoney
                  data:
                    product_code: <EMONEY product code>
                    password: your_merchant_biller_password
                    customer_id: '6032984012345678'
              E-Wallet:
                summary: ewallet — direct, customer_id = wallet phone number (V3 only)
                value:
                  command: ewallet
                  data:
                    product_code: <EWALLET product code>
                    password: your_merchant_biller_password
                    customer_id: '08123456789'
              Cash Withdrawal:
                summary: >-
                  cashwd — direct, customer_id = recipient phone number (V3
                  only)
                value:
                  command: cashwd
                  data:
                    product_code: <CASHWD product code>
                    password: your_merchant_biller_password
                    customer_id: '08123456789'
              PLN Token:
                summary: plntok — inquiry-based
                value:
                  command: plntok
                  data:
                    product_code: SPPLNTOK50
                    password: your_merchant_biller_password
                    customer_id: '14051688338'
                    reference_number: SPPLNTOK50RJBL00961254684561749552869
              Game Top Up:
                summary: topupg — inquiry-based
                value:
                  command: topupg
                  data:
                    product_code: SPGTML5D
                    password: your_merchant_biller_password
                    customer_id: '12345678'
                    reference_number: SPGTML5DALTR00123456781761806200
      responses:
        '200':
          description: Payment accepted (00 success / 01 pending)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrepaidPaymentV3Response'
              examples:
                Pulsa Pending:
                  summary: pulsa pending
                  value:
                    command: pulsa
                    response_code: '01'
                    response_text: Payment pending
                    data:
                      customer_id: '08123456789'
                      amount: '10000'
                      price: '11500'
                      transaction_id: 01JWX2F2DZC68TC94XMNBJCC3H
                      created_at: '2026-08-20 13:30:00'
                PLN Token Success:
                  summary: plntok success (with token)
                  value:
                    command: plntok
                    response_code: '00'
                    response_text: Payment success
                    data:
                      customer_name: JOHN DOE
                      token: 1234-5678-9012-3456-7890
                      customer_id: '14051688338'
                      amount: '50000'
                      price: '52500'
                      transaction_id: 01JWX2G7RVY1B9K2M3N4P5Q6R7
                      created_at: '2026-08-20 13:31:00'
                Streaming Success:
                  summary: >-
                    strmg / emoney / ewallet / cashwd (customer_name, token,
                    serial_number when returned)
                  value:
                    command: strmg
                    response_code: '00'
                    response_text: Payment success
                    data:
                      customer_name: ''
                      token: SPTF-AB12-CD34-EF56
                      serial_number: '0123456789'
                      customer_id: '08123456789'
                      amount: '54990'
                      price: '55500'
                      transaction_id: 01JWX2J1K2L3M4N5P6Q7R8S9T0
                      created_at: '2026-08-20 13:55:00'
        '400':
          description: >-
            Insufficient merchant balance (17); product not in the flat category
            of `command` / wrong payment type / unknown command (06);
            product_code or customer_id differ from the inquiry (04)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillerErrorV3Response'
              examples:
                Insufficient balance:
                  summary: Balance below price or below the reject limit
                  value:
                    command: pulsa
                    response_code: '17'
                    response_text: Merchant's balance is insufficient for this transaction
                Wrong command:
                  summary: Product does not belong to the command category
                  value:
                    command: data
                    response_code: '06'
                    response_text: >-
                      Product ID SPTLKMAS10 is not classified as a `data`
                      product.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: >-
            Product not found, product or flat category inactive, or
            reference_number used or expired (06)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillerErrorV3Response'
              examples:
                Inactive:
                  summary: Product switched off
                  value:
                    command: pulsa
                    response_code: '06'
                    response_text: 'Product SPTLKMAS10 is not available: product is inactive'
                Reference expired:
                  summary: reference_number used or expired
                  value:
                    command: plntok
                    response_code: '06'
                    response_text: Reference number is used or expired, please retry.
        '422':
          description: >-
            Validation error, wrong password, invalid customer_id format, or
            missing reference_number for plntok/topupg (04); credential not
            found (16)
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ValidationErrorResponse'
                  - $ref: '#/components/schemas/BillerErrorV3Response'
              example:
                command: plntok
                response_code: '04'
                response_text: reference_number is required for this command
        '500':
          description: System error (99)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillerErrorV3Response'
      security:
        - bearerAuth: []
components:
  schemas:
    PrepaidPaymentV3Response:
      description: >-
        V3 prepaid payment response (direct and inquiry-based). response_code 00
        = success at vendor, 01 = pending (final status arrives via callback).
        Extra vendor fields (customer_name, token, serial_number, ...) depend on
        the command template.
      properties:
        command:
          type: string
          example: pulsa
        response_code:
          type: string
          enum:
            - '00'
            - '01'
          example: '01'
        response_text:
          type: string
          example: Payment pending
        data:
          properties:
            customer_id:
              type: string
              example: '08123456789'
            amount:
              type: string
              example: '10000'
            price:
              description: Amount deducted from the merchant balance
              type: string
              example: '11500'
            token:
              description: PLN token / voucher code when the vendor returns one
              type: string
              example: null
              nullable: true
            serial_number:
              type: string
              example: null
              nullable: true
            transaction_id:
              description: Use with v3/detail-bill-transaction
              type: string
              example: 01JWX2F2DZC68TC94XMNBJCC3H
            created_at:
              type: string
              example: '2026-08-20 13:30:00'
          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.