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

# Recover transaction using canonical merchant reference

> Recovery endpoint for partner timeout scenarios. Looks up a transaction by partner-scoped canonical `merchant_reference` and returns the same snapshot shape as `GET /transactions/{id}`.



## OpenAPI

````yaml /openapi/openapi.json get /partner/transactions/reference/{merchant_reference}
openapi: 3.1.0
info:
  title: CashWeb Partner API
  description: >-
    CashWeb Partner API enables crypto-to-fiat offramp transactions. Create
    quotes, manage transactions, receive lifecycle webhooks, and reconcile
    revenue.
  contact:
    name: Michael Anyi
    email: michael@cashweb.cash
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api-staging.cashweb.cash/api/v1
    description: Staging environment
  - url: https://api.cashweb.cash/api/v1
    description: Production environment
security: []
paths:
  /partner/transactions/reference/{merchant_reference}:
    get:
      tags:
        - Partner API
      summary: Recover transaction using canonical merchant reference
      description: >-
        Recovery endpoint for partner timeout scenarios. Looks up a transaction
        by partner-scoped canonical `merchant_reference` and returns the same
        snapshot shape as `GET /transactions/{id}`.
      operationId: get_transaction_by_reference
      parameters:
        - name: merchant_reference
          in: path
          description: Partner merchant reference
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Transaction retrieved
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApiResponse_PartnerTransactionDetailsResponse
              example:
                data:
                  amount: '161500.00'
                  confirmations: null
                  confirmed_at: null
                  created_at: '2026-02-12T11:55:00Z'
                  crypto_amount: '100.00'
                  crypto_currency: usdt
                  deposit_address: TUr4xexampleaddress
                  deposit_id: null
                  deposit_status: null
                  expires_at: '2026-02-12T12:00:00Z'
                  id: 01917f00-7b4c-7f56-8a2b-15998d58c9f3
                  merchant_id: mrc_001
                  merchant_reference: order-4551
                  network: trc20
                  rate: '1615.00'
                  received_at: null
                  required_confirmations: null
                  status: awaiting_deposit
                  terminal_id: term_01
                  updated_at: '2026-02-12T11:55:00Z'
                success: true
        '401':
          description: Missing or invalid partner API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Transaction not found for reference under this partner
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: NOT_FOUND
                  message: Transaction not found
                  timestamp: '2026-02-12T12:00:00Z'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - PartnerApiKey: []
components:
  schemas:
    ApiResponse_PartnerTransactionDetailsResponse:
      type: object
      description: Standard API response wrapper for all successful responses
      required:
        - success
        - data
      properties:
        data:
          type: object
          description: Detailed partner transaction snapshot for TSQ and recovery reads.
          required:
            - id
            - deposit_address
            - network
            - expires_at
            - status
            - crypto_currency
            - crypto_amount
            - rate
            - amount
            - deposit_status
            - created_at
            - updated_at
          properties:
            amount:
              type: string
              description: Fiat amount in NGN derived at create time.
              example: '161500.00'
            confirmations:
              type:
                - integer
                - 'null'
              format: int32
              description: Latest observed confirmation count.
              example: 1
            confirmed_at:
              type:
                - string
                - 'null'
              format: date-time
              description: Deposit confirmed timestamp in UTC RFC3339.
              example: '2026-02-12T12:01:00Z'
            created_at:
              type: string
              format: date-time
              description: Transaction creation timestamp in UTC RFC3339.
              example: '2026-02-12T11:55:00Z'
            crypto_amount:
              type: string
              description: Crypto amount in token units.
              example: '100.00'
            crypto_currency:
              type: string
              description: Token for this transaction.
              example: usdt
            deposit_address:
              type: string
              description: >-
                Deposit address where the seller should send funds for this
                transaction.
              example: '0x9d8D32b6D7DfDdAb66f6a79b9dA8fA2E30A91B7a'
            deposit_id:
              type:
                - string
                - 'null'
              description: Provider deposit identifier when a deposit has been detected.
              example: dep_abc123
            deposit_status:
              type: string
              description: Latest known deposit status.
              example: confirmed
            expires_at:
              type: string
              format: date-time
              description: >-
                Deposit deadline. Deposits after this timestamp may require
                manual recovery.
              example: '2026-02-12T12:00:00Z'
            id:
              type: string
              format: uuid
              example: 01917f00-7b4c-7f56-8a2b-15998d58c9f3
            merchant_id:
              type:
                - string
                - 'null'
              description: Partner-provided merchant identifier.
              example: mrc_001
            merchant_reference:
              type:
                - string
                - 'null'
              description: >-
                Partner-owned canonical reference used for timeout recovery and
                reconciliation.
              example: order-4551
            network:
              type: string
              description: Network expected for the deposit address.
              example: bep20
            rate:
              type: string
              description: Executable partner rate in NGN per token.
              example: '1615.00'
            received_at:
              type:
                - string
                - 'null'
              format: date-time
              description: Deposit received timestamp in UTC RFC3339.
              example: '2026-02-12T11:58:00Z'
            required_confirmations:
              type:
                - integer
                - 'null'
              format: int32
              description: Required confirmation count for final crediting.
              example: 1
            status:
              type: string
              description: >-
                Current transaction lifecycle status.

                Allowed values: pending, awaiting_deposit, deposit_confirming,
                selling_crypto, order_filled,

                completed, failed, expired, cancelled, refunded.
              example: deposit_confirming
            terminal_id:
              type:
                - string
                - 'null'
              description: Partner-provided terminal identifier.
              example: term_01
            updated_at:
              type: string
              format: date-time
              description: Last transaction update timestamp in UTC RFC3339.
              example: '2026-02-12T12:04:10Z'
        message:
          type:
            - string
            - 'null'
          description: Optional message for additional information
        success:
          type: boolean
          description: Indicates if the request was successful
          example: 'true'
    ErrorResponse:
      type: object
      description: Error response structure for OpenAPI documentation
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetails'
          description: Error details
    ErrorDetails:
      type: object
      description: Error details structure
      required:
        - message
        - code
        - timestamp
      properties:
        code:
          type: string
          description: Machine-readable error code
        message:
          type: string
          description: Human-readable error message
        timestamp:
          type: string
          format: date-time
          description: Timestamp when the error occurred
  securitySchemes:
    PartnerApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````