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

# Simulate transaction event in sandbox environment



## OpenAPI

````yaml /api-reference/openapi.yaml post /v2/simulate_transaction_event
openapi: 3.1.0
info:
  title: Public Imprint API
  version: '2.0'
servers:
  - url: https://dev.sbx.imprint.co
    description: Imprint public api sandbox
security:
  - basicAuth: []
  - bearerAuth: []
paths:
  /v2/simulate_transaction_event:
    post:
      tags:
        - Simulate Transaction Event
      summary: Simulate transaction event in sandbox environment
      operationId: simulateTransactionEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - payment_method_id
                - status
              properties:
                event_id:
                  type: string
                  description: Unique identifier of the event.
                  example: e2806932-5f1b-4518-8b15-156d773e9496
                transaction_id:
                  type: string
                  description: >-
                    Unique identifier of the transaction. Required to VOID,
                    UPDATE, CAPTURE, or REFUND a transaction
                  example: e2806932-5f1b-4518-8b15-156d773e9496
                payment_method_id:
                  type: string
                  description: Unique identifier of the payment method used.
                  example: 7f754378-dd84-4a9a-b1ce-0646bb769c29
                status:
                  $ref: '#/components/schemas/TransactionStatus'
                amount:
                  type: integer
                  description: >-
                    Amount of the transaction in the smallest currency unit
                    (e.g., cents for USD).
                  example: 5000
                currency:
                  $ref: '#/components/schemas/TransactionCurrency'
                authorization_code:
                  type: string
                  nullable: true
                  description: Code used to authorize the transaction.
                  example: '645432'
                network_transaction_id:
                  type: string
                  nullable: true
                  description: >-
                    Unique transaction identifier assigned by the payment
                    network.
                  example: txn-789456
                purchase_method:
                  $ref: '#/components/schemas/PurchaseMethod'
                merchant:
                  $ref: '#/components/schemas/Merchant'
      responses:
        '200':
          description: Transaction event created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionEvent'
        '409':
          description: Transaction event can not be created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
components:
  schemas:
    TransactionStatus:
      type: string
      enum:
        - APPROVED
        - UPDATED
        - VOIDED
        - CAPTURED
        - REFUNDED
      example: APPROVED
    TransactionCurrency:
      type: string
      description: >-
        The 3-character currency code of the amount in ISO 4217 format (e.g.,
        "USD")
      example: USD
    PurchaseMethod:
      type: string
      enum:
        - CHIP
        - CONTACTLESS
        - KEYEDIN
        - ONLINE
        - SWIPE
        - QRCODE
        - OCR
        - UNKNOWN
      nullable: true
      description: How the purchase was completed.
      example: CHIP
    Merchant:
      type: object
      properties:
        network_id:
          type: string
          description: Unique identifier of the merchant assigned by the payment network.
          example: '234923454545'
        name:
          type: string
          description: Name of the merchant where the transaction occurred.
          example: Target
        category:
          type: string
          nullable: true
          description: Name of the merchant category.
          example: Grocery Stores
        category_code:
          type: string
          nullable: true
          description: Code associated with the merchant category.
          example: '5411'
        address:
          $ref: '#/components/schemas/Address'
          type: object
    TransactionEvent:
      type: object
      properties:
        transaction_id:
          type: string
          description: Unique identifier of the transaction
          example: E777214A-2D11-4CAD-9E8F-E1BD71D9FE67
        event_id:
          type: string
          description: >-
            Unique identifier of the event generated, matches the event_id in
            the transaction event notification
          example: E777214A-2D11-4CAD-9E8F-E1BD71D9FE67
        status:
          $ref: '#/components/schemas/TransactionStatus'
    ConflictError:
      type: object
      description: object's current state prevents the requested update
      properties:
        type:
          type: string
        message:
          type: string
    Address:
      type: object
      description: Mailing address information
      properties:
        street_line1:
          type: string
          description: Primary street address
          example: 123 Main St
        street_line2:
          type: string
          description: Secondary street address (apartment, suite, etc.)
          example: Apt 4B
        city:
          type: string
          description: City name
          example: San Francisco
        state:
          type: string
          description: State or province
          example: CA
        postal_code:
          type: string
          description: ZIP or postal code
          example: '94105'
        country:
          type: string
          description: ISO-3166-1 alpha-3 Country Code
          example: USA
  securitySchemes:
    bearerAuth:
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication. Allowed headers-- Authorization: Bearer
        <api_key>
      scheme: bearer
      type: http

````