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

# Post transactionssimulate

> Simulates a network transaction in sandbox environment.
Validates card status and available balance similar to production.



## OpenAPI

````yaml https://core.sandbox.gnosispay.in/simulator-api/openapi.json post /transactions/simulate
openapi: 3.2.0
info:
  title: Simulator Service
  description: >-
    Card transaction simulator for sandbox/staging environments; the server
    never runs in production. Authenticates via HTTP Basic Auth with username
    "simulator" and the configured password.
  version: 0.0.0
servers: []
security:
  - BasicAuth: []
tags:
  - name: Simulator
paths:
  /transactions/simulate:
    post:
      tags:
        - Simulator
      description: |-
        Simulates a network transaction in sandbox environment.
        Validates card status and available balance similar to production.
      operationId: TransactionSimulator_simulate
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulateTransactionRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulateTransactionResponse'
        '202':
          description: >-
            The request has been accepted for processing, but processing has not
            yet completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreeDSSimulation'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SimulateTransactionRequest:
      type: object
      required:
        - transaction_type
        - card_id
        - amount
        - currency
      properties:
        transaction_type:
          $ref: '#/components/schemas/TransactionType'
          description: Type of transaction to simulate
        card_id:
          $ref: '#/components/schemas/uuid'
          description: Card ID
        amount:
          type: string
          description: Transaction amount in major units (e.g., "100.50" for $100.50)
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          description: ISO 4217 alphabetic currency code (e.g. USD, EUR, BRL, JPY)
        authorization_code:
          type: string
          description: >-
            Authorization code from previous authorization (required for
            reversal, replacement, clearing, and clearing_cancellation)
        replacement_amount:
          type: string
          description: New amount for replacement (required for replacement type)
        merchant_name:
          type: string
          description: Merchant name (defaults to "TEST MERCHANT")
        merchant_code:
          type: string
          description: Merchant Category Code (defaults to "5541")
        operation:
          $ref: '#/components/schemas/TransactionOperation'
          description: >-
            Transaction operation type. Determines the processing code sent to
            the network.

            When omitted, defaults to "purchase" for debit transactions.
        3ds:
          type: boolean
          description: >-
            Require an out-of-band 3DS decision before sending the authorization
            to the card processor.
      examples:
        - transaction_type: authorization
          card_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          amount: '100.50'
          currency: USD
          merchant_name: COFFEE SHOP
          merchant_code: '5812'
    SimulateTransactionResponse:
      type: object
      required:
        - status
        - authorization_code
        - authorization_id
        - authorization_date_time
        - settlement_amount
        - mode_type
        - card_mode
        - is_domestic_transaction
      properties:
        status:
          $ref: '#/components/schemas/SimulationStatus'
          description: Whether the simulated transaction was approved or denied
        authorization_code:
          type: string
          description: >-
            Authorization code generated for the transaction. Use this for
            reversal/replacement.
        authorization_id:
          type: integer
          format: int64
          description: Authorization ID from the processing platform
        authorization_date_time:
          type: string
          format: date-time
          description: Authorization timestamp
        settlement_amount:
          type: string
          description: Settlement amount processed
        mode_type:
          type: string
          description: Transaction mode (DEBIT/CREDIT)
        card_mode:
          type: string
          description: Card mode used
        is_domestic_transaction:
          type: boolean
          description: Whether this is a domestic transaction
        denial_code:
          type: string
          description: Denial code. Only present when status is "denied".
        denial_reason:
          type: string
          description: >-
            Human-readable reason for denial. Only present when status is
            "denied".
      examples:
        - status: approved
          authorization_code: ABC123
          authorization_id: 98765432
          authorization_date_time: '2025-06-15T14:30:00Z'
          settlement_amount: '100.50'
          mode_type: DEBIT
          card_mode: CHIP
          is_domestic_transaction: true
    ThreeDSSimulation:
      type: object
      required:
        - simulation_id
        - status
        - expires_at
      properties:
        simulation_id:
          $ref: '#/components/schemas/uuid'
        status:
          $ref: '#/components/schemas/ThreeDSSimulationStatus'
        expires_at:
          type: string
          format: date-time
        challenge_id:
          $ref: '#/components/schemas/uuid'
        transaction:
          $ref: '#/components/schemas/SimulateTransactionResponse'
        error:
          type: string
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
    TransactionType:
      type: string
      enum:
        - authorization
        - reversal
        - replacement
        - clearing
        - clearing_cancellation
    uuid:
      type: string
      format: uuid
    TransactionOperation:
      type: string
      enum:
        - credit_reversal
        - credit_transfer
        - credit_voucher
        - debit_reversal
        - debit_transfer
        - deposit_by_bill
        - international_credit_voucher
        - international_purchase
        - international_purchase_reversal
        - international_withdrawal
        - national_withdrawal
        - purchase
        - purchase_quasi_cash
        - refund_purchase
        - reversal_international_withdrawal
        - reversal_purchase_quasi_cash
        - reverse_national_withdrawal
        - utilities_payment
      description: >-
        Transaction operation determines the processing code sent to the card
        network.
    SimulationStatus:
      type: string
      enum:
        - approved
        - denied
    ThreeDSSimulationStatus:
      type: string
      enum:
        - pending
        - processing
        - completed
        - declined
        - cancelled
        - expired
        - failed
  securitySchemes:
    BasicAuth:
      type: http
      scheme: Basic

````

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