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

# Simulate Authorization

> Simulate an authorization type transaction by including the `card_id` and other authorization details in your request.
Only cards with BINs below are supported for simulation.
- `40963608`




## OpenAPI

````yaml /card-issuance/v1.6/issuing.yaml post /v1/simulation/issuing/authorization
openapi: 3.0.2
info:
  title: Issuing API
  version: 0.0.1
  description: >
    UQPAY Issuing API allows you to issue virtual cards, manage cardholders, and
    monitor card transactions.


    ## What you can do

    - Create and manage virtual cards (issue, activate, freeze, cancel)

    - Onboard and verify cardholders with KYC

    - Set spending limits and card controls

    - Recharge and withdraw card balances

    - Query card transactions and account balances

    - Transfer funds between issuing accounts

    - Generate and download reports


    ## Authentication

    All requests require a valid auth token obtained via the [Access
    Token](/account-center/v1.6/api-reference/access-token) endpoint. Include
    the token in the `x-auth-token` header.


    ## Idempotency

    POST requests support the `x-idempotency-key` header to safely retry without
    creating duplicate resources.
  contact:
    name: UQPAY Support Team
    url: https://www.uqpay.com/support
    email: support@uqpay.com
  license:
    name: Proprietary
    url: https://www.uqpay.com/legal/api-terms
  termsOfService: https://www.uqpay.com/legal/terms
  x-api-id: uqpay-issuing-api-v1.6.0
  x-categories:
    - Card Issuing
    - Transaction Processing
  x-features:
    - Virtual Card Issuance
    - Real-time Processing
    - Webhook Notifications
    - Comprehensive Reporting
    - Transaction Monitoring
servers:
  - url: https://api-sandbox.uqpaytech.com/api
    description: Sandbox base URL.
  - url: https://api.uqpay.com/api
    description: Production base URL.
security: []
tags:
  - name: Card Lifecycle
    description: >-
      Create cards and manage their full lifecycle — issue, retrieve, update,
      activate, assign, and change status.
  - name: Card Secure Data
    description: >-
      Access sensitive card data (PAN, CVV) through the PCI-compliant endpoint
      or a tokenized iframe. Availability depends on your PCI status, not the
      card product.
  - name: Card Funding
    description: Load and unload a card's stored balance for prepaid-style cards.
  - name: Card PIN
    description: >-
      Set and manage card PINs. `reset-pin` covers physical cards;
      `manage-card-pin` covers virtual cards.
  - name: Card Add-ons
    description: >-
      Product-specific card capabilities. Each operation applies only to certain
      card products — see [Card
      products](/card-issuance/v1.6/guide/card-products).
  - name: Card Arts
    description: >-
      Manage the visual designs (card arts) available to your issuing account.
      Set an account-wide default, or pass `card_art_id` when issuing or
      updating a card to override per card. Available on Personal Visa.
  - name: Cardholders
    description: >-
      You can create cardholders, which are authorized representatives of your
      business that can be issued cards.
  - name: Transactions
    description: >-
      These APIs allow you to retrieve information on transactions that are made
      on your user's cards.
  - name: Products
    description: >-
      With this set of APIs, you will be able to create card orders for your
      customers.
  - name: Balances
    description: >-
      The available and pending amounts for each currency are broken down
      further by payment source types. You can retrieve it to see the balance
      currently on your issuing account.
  - name: Transfers
    description: Transfer funds between issuing accounts.
  - name: Reports
    description: Generate and download issuing reports.
  - name: Simulator
    description: Simulate card transactions on the sandbox environment.
paths:
  /v1/simulation/issuing/authorization:
    post:
      tags:
        - Simulator
      summary: Simulate Authorization
      description: >
        Simulate an authorization type transaction by including the `card_id`
        and other authorization details in your request.

        Only cards with BINs below are supported for simulation.

        - `40963608`
      operationId: simulate-authorization
      parameters:
        - $ref: '#/components/parameters/XOnBehalfOf'
        - $ref: '#/components/parameters/XIdempotencyKey'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulateAuthorizationRequest'
      responses:
        '200':
          headers:
            x-response-id:
              $ref: '#/components/headers/XResponseId'
          description: Authorization simulated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulateAuthorizationResponse'
                title: SimulateAuthorizationResponse
      security:
        - XAuthToken: []
components:
  parameters:
    XOnBehalfOf:
      in: header
      name: x-on-behalf-of
      schema:
        type: string
      required: false
      description: >
        Specifies the sub-account on whose behalf the request is made. This
        should be set to the `account_id`, which can be retrieved via the [List
        Connected
        Accounts](/account-center/v1.6/api-reference/list-connected-accounts)
        endpoint. If omitted or empty, the request is executed using the master
        account.

        More information at [Connected
        Accounts](/account-center/v1.6/guide/connected-accounts).
      example: 18523f72-f4de-4f9c-bb8e-ec7d1c4f32be
    XIdempotencyKey:
      in: header
      name: x-idempotency-key
      schema:
        type: string
        format: uuid
      required: true
      description: >-
        A unique identifier (UUID) used to maintain operation idempotency,
        ensuring that repeated executions of the same operation do not result in
        unintended effects or duplication. It helps preserve data consistency in
        the face of network errors, retries, or failures.
      example: 18523f72-f4de-4f9c-bb8e-ec7d1c4f32be
  schemas:
    SimulateAuthorizationRequest:
      type: object
      required:
        - card_id
        - transaction_amount
        - transaction_currency
        - merchant_name
        - merchant_category_code
      properties:
        card_id:
          $ref: '#/components/schemas/CardId'
        transaction_amount:
          type: number
          description: The transaction amount to simulate.
          example: 10
        transaction_currency:
          type: string
          description: Currency of the transaction.
          example: USD
        merchant_name:
          type: string
          example: Orchard Central
          description: Name of the merchant
        merchant_category_code:
          type: string
          description: >-
            The merchant category code for the merchant's business. Can only be
            `5734`.
          example: '5734'
    SimulateAuthorizationResponse:
      type: object
      required:
        - card_id
        - card_number
        - cardholder_id
        - transaction_id
        - transaction_type
        - card_available_balance
        - authorization_code
        - billing_amount
        - billing_currency
        - transaction_amount
        - transaction_currency
        - transaction_time
        - merchant
        - posted_date
        - failure_reason
        - transaction_status
      properties:
        card_id:
          $ref: '#/components/schemas/CardId'
        card_number:
          type: string
          example: '************5668'
          description: Masked card number
        cardholder_id:
          $ref: '#/components/schemas/CardholderId'
        transaction_id:
          $ref: '#/components/schemas/TransactionId'
        transaction_type:
          $ref: '#/components/schemas/SimulateTransactionType'
        card_available_balance:
          type: number
          example: 2506.26
          description: The card available balance.
        authorization_code:
          type: string
          example: '856268'
          description: Authorization Code
        billing_amount:
          type: number
          example: 70.25
          description: Billing amount
        billing_currency:
          type: string
          example: SGD
          description: Billing Currency
        transaction_amount:
          type: number
          example: 100.25
          description: Transaction amount
        transaction_currency:
          type: string
          example: USD
          description: Transaction currency
        transaction_time:
          type: string
          example: '2024-03-21T17:17:32+08:00'
          description: Transaction occurrence time
        posted_time:
          type: string
          example: '2024-03-21T17:17:32+08:00'
          description: Transaction posted time
        merchant_data:
          $ref: '#/components/schemas/MerchantData'
        failure_reason:
          type: string
          description: Reason for transaction failure.
          example: 1107 - Invalid CVV2
        transaction_status:
          $ref: '#/components/schemas/SimulateTransactionStatus'
    CardId:
      type: string
      example: c0cef051-29c5-4796-b86a-cd5b684bfad7
      description: Unique identifier for the card.
    CardholderId:
      type: string
      description: The cardholder's unique identifier.
      example: 7c4ff2cd-1bf6-4aaa-bf16-266771425011
      format: uuid
    TransactionId:
      type: string
      format: uuid
      description: Unique Identifier for transaction.
      example: 5135e6cc-28b6-4889-81dc-3b86a09e1395
    SimulateTransactionType:
      type: string
      example: AUTHORIZATION
      description: |
        The type of transaction being simulated.
      enum:
        - AUTHORIZATION
        - REFUND
        - REVERSAL
    MerchantData:
      type: object
      description: >-
        Details about the merchant (grocery store, e-commerce website, etc.)
        involved in this transaction.
      required:
        - category
        - interval
      properties:
        category_code:
          type: string
          description: The merchant category code for the merchant's business.
          example: '6011'
        city:
          type: string
          description: City where the merchant is located
          example: CITY NAME
        country:
          type: string
          description: Country where the merchant is located
          example: CN
        name:
          type: string
          description: Name of the merchant
          example: ACQUIRER NAME
    SimulateTransactionStatus:
      type: string
      description: The high-level status indicating the stage of the transaction lifecycle.
      example: APPROVED
      enum:
        - APPROVED
        - DECLINED
  headers:
    XResponseId:
      description: >-
        Universally unique identifier (UUID v4) for the response. Helpful for
        identifying a request when communicating with UQPAY support.
      schema:
        type: string
        format: uuid
        example: 2adba88e-9d63-44bc-b975-9b6ae3440dde
  securitySchemes:
    XAuthToken:
      type: apiKey
      in: header
      name: x-auth-token
      description: The API token for login provided by UQPay.

````