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

# Get Transaction Status

> Retrieve the current status and details of any transaction (payment or withdrawal). 
This is essential for monitoring transaction progress, especially for asynchronous 
payment methods like SPEI transfers and cash payments.


<Warning>
  The Authorization needs to be in the following format:

  `Authorization: Token <YOUR_API_KEY>`
</Warning>

Retrieve the current status and details of any transaction (payment or withdrawal). This is essential for monitoring transaction progress, especially for asynchronous payment methods like SPEI transfers and cash payments.


## OpenAPI

````yaml GET /transactions/{transaction_id}/
openapi: 3.0.3
info:
  title: Tonder
  description: Tonder API
  termsOfService: https://www.google.com/policies/terms/
  contact:
    email: hello@tonder.io
  version: v1
servers:
  - url: https://api-stage.tonder.io/api/v1
    description: Staging
  - url: https://api.tonder.io/api/v1
    description: Production
security: []
paths:
  /transactions/{transaction_id}/:
    get:
      tags:
        - Direct Integration
      summary: Get Transaction Status
      description: >
        Retrieve the current status and details of any transaction (payment or
        withdrawal). 

        This is essential for monitoring transaction progress, especially for
        asynchronous 

        payment methods like SPEI transfers and cash payments.
      operationId: getTransactionStatus
      parameters:
        - name: transaction_id
          in: path
          required: true
          description: >-
            The unique transaction identifier returned from the `/process/`
            endpoint
          schema:
            type: string
            format: uuid
            example: 550e8400-e29b-41d4-a716-446655440000
      responses:
        '200':
          description: Transaction status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectTransactionStatusResponse'
              examples:
                payment_success:
                  summary: Successful Payment
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440000
                    operation_type: payment
                    status: success
                    amount: 150
                    currency: MXN
                    merchant_reference: order-789
                    created_at: '2024-07-26T10:30:00Z'
                    updated_at: '2024-07-26T10:32:15Z'
                    completion_details:
                      completed_at: '2024-07-26T10:32:15Z'
                      authorization_code: AUTH123456
                withdrawal_processing:
                  summary: Processing Withdrawal
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    operation_type: withdrawal
                    status: processing
                    amount: 750
                    currency: MXN
                    merchant_reference: payout-001
                    created_at: '2024-07-26T10:30:00Z'
                    updated_at: '2024-07-26T10:35:22Z'
                    transfer_details:
                      transfer_method: SPEI
                      beneficiary_account: '***************4567'
                      estimated_completion: '2024-07-26T18:00:00Z'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectErrorResponse'
        '404':
          description: Transaction Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectErrorResponse'
components:
  schemas:
    DirectTransactionStatusResponse:
      allOf:
        - $ref: '#/components/schemas/DirectTransactionResponse'
        - type: object
          properties:
            updated_at:
              type: string
              format: date-time
              description: ISO 8601 timestamp of last update
            completion_details:
              $ref: '#/components/schemas/DirectCompletionDetails'
            transfer_details:
              $ref: '#/components/schemas/DirectTransferDetails'
    DirectErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - type
          properties:
            code:
              type: string
              description: A specific, machine-readable code for the error
            message:
              type: string
              description: A human-readable message explaining the error
            type:
              type: string
              enum:
                - request_error
                - auth_error
                - validation_error
                - server_error
              description: The category of the error
            details:
              type: object
              additionalProperties: true
              description: Additional context about the error
        request_id:
          type: string
          description: A unique identifier for the request
    DirectTransactionResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique transaction identifier
        operation_type:
          type: string
          enum:
            - payment
            - withdrawal
          description: Type of transaction
        status:
          type: string
          enum:
            - pending
            - on_hold
            - processing
            - sent_to_provider
            - success
            - paid_full
            - in_transit
            - authorized
            - canceled
            - declined
            - rejected
            - failed
            - Unknown
            - expired
          description: Current transaction status
        amount:
          type: number
          format: decimal
          description: Transaction amount
        currency:
          type: string
          description: Currency code
        client_reference:
          type: string
          description: Your reference identifier
        payment_id:
          type: integer
          description: Payment ID (for payments)
        transaction_id:
          type: string
          description: Provider transaction ID
        provider:
          type: string
          description: Payment provider used
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of creation
        status_code:
          type: integer
          description: HTTP status code
        next_action:
          $ref: '#/components/schemas/DirectNextAction'
        payment_instructions:
          $ref: '#/components/schemas/DirectPaymentInstructions'
    DirectCompletionDetails:
      type: object
      properties:
        completed_at:
          type: string
          format: date-time
          description: Completion timestamp
        authorization_code:
          type: string
          description: Authorization code
    DirectTransferDetails:
      type: object
      properties:
        transfer_method:
          type: string
          enum:
            - SPEI
            - DEBIT_CARD
          description: Transfer method used
        beneficiary_account:
          type: string
          description: Masked beneficiary account
        estimated_completion:
          type: string
          format: date-time
          description: Estimated completion time
    DirectNextAction:
      type: object
      properties:
        redirect_to_url:
          type: object
          properties:
            url:
              type: string
              format: uri
              description: URL to redirect customer for 3DS authentication
            return_url:
              type: string
              format: uri
              description: URL to return after 3DS completion
            verify_transaction_status_url:
              type: string
              description: URL to check transaction status after 3DS
    DirectPaymentInstructions:
      type: object
      properties:
        reference:
          type: string
          description: Payment reference code
        account_number:
          type: string
          description: Account number for transfer
        bank_name:
          type: string
          description: Bank name
        amount:
          type: number
          format: decimal
          description: Amount to pay
        expires_at:
          type: string
          format: date-time
          description: Payment expiration time
        reference_code:
          type: string
          description: Reference code for cash payments
        barcode:
          type: string
          description: Barcode for cash payments
        store_name:
          type: string
          description: Store name for cash payments
        expiration_date:
          type: string
          format: date-time
          description: Payment expiration date
        instructions:
          type: array
          items:
            type: string
          description: Payment instructions
        voucher_pdf:
          type: string
          format: uri
          description: URL to payment voucher PDF

````