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

# Get a transaction

> Looks up an onramp or offramp order by the id returned when it was created, at any stage from INIT through to COMPLETED or ERROR. Only orders belonging to the API key’s business are found; any other id returns 404.

Returns an onramp or offramp order in its current state. The `id` is the one on
the response that created the order — from [Create an onramp
order](/api-reference/create-onramp-order) or [Create an offramp
order](/api-reference/create-offramp-order) — and it stays the same for the
order's whole life, so the id you stored at creation finds it at `INIT`,
`PROCESSING`, `COMPLETED` or `ERROR` alike.

The body uses the same fields as the response that created the order and as a
ramp webhook delivery, so one parser handles all three. Two differences are
worth knowing:

* The payout account (`accountNumber`, `accountName`, `bank`) that [Create an
  offramp order](/api-reference/create-offramp-order) adds to its response is
  not repeated here. Keep it from the creation response if you need it.
* Once an onramp order is `COMPLETED`, the virtual account it was paid into is
  no longer included — it has served its purpose.

## When to call it

Webhooks are the primary way to follow an order; this is the fallback. It is
the right call when:

* a webhook delivery failed or your handler was down, and you need to know where
  an order ended up;
* you want to confirm a webhook against Paj's own record before acting on it;
* you have no webhook configured and are polling.

If you are polling, a few seconds apart is plenty while an order is
`PROCESSING`. An order in `INIT` is waiting on your user, not on Paj, so there
is no point polling it quickly.

## Only your own orders

The lookup is scoped to the business behind your API key. An id that belongs to
another business returns `404`, exactly as an id that does not exist does, so the
response never reveals whether someone else's order is real.

An id that is not a well-formed id at all is a `400`.

<Note>
  Unpaid orders are deleted 72 hours after creation, so an order that never
  left `INIT` eventually starts returning `404`. Treat that as expired rather
  than as an error.
</Note>


## OpenAPI

````yaml GET /pub/v2/transaction/{id}
openapi: 3.0.0
info:
  title: Paj Public API
  description: >-
    Programmatic access to Paj's on/off ramp. Register a Nigerian bank account,
    get

    the on-chain address that pays it, create offramp orders for a specific
    amount,

    and read the live conversion rates.


    Every request must carry an `x-api-key` header. Keys are scoped to a
    business,

    and the rates you receive already have that business's fee applied.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.paj.cash
    description: Production
security: []
tags: []
paths:
  /pub/v2/transaction/{id}:
    get:
      tags:
        - Pub V2
      summary: Get a transaction
      description: >-
        Looks up an onramp or offramp order by the id returned when it was
        created, at any stage from INIT through to COMPLETED or ERROR. Only
        orders belonging to the API key’s business are found; any other id
        returns 404.
      operationId: PubV2Controller_getTransaction
      parameters:
        - name: id
          required: true
          in: path
          description: The id returned when the order was created
          schema:
            example: 68ff3a4ee9834db8927f61ed
            type: string
      responses:
        '200':
          description: The transaction in its current state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionInterfaceDto'
        '400':
          description: The id is not a valid id
        '401':
          description: Missing or invalid API key (x-api-key header)
        '404':
          description: No transaction with that id belongs to your business
      security:
        - x-api-key: []
components:
  schemas:
    TransactionInterfaceDto:
      type: object
      properties:
        id:
          type: string
          description: Transaction Id
          example: 679be2527f99f556d77b8cc2
        address:
          type: string
          description: Address
          example: 4KSLE7EU1P7PQ8Rc4hdb2ZKq2JmWHD8UXJp7guEdyT9j
        signature:
          type: string
          description: Transaction Signature
          example: >-
            2oLx7XrXP7Df9dZca1difJ91ZFmA44EEadNqrZTecta6ugcX8BAETbpvKQs54r58fmJTQVLzUSuzvRBFwS1GfJLo
        mint:
          type: string
          description: Mint Address
          example: So11111111111111111111111111111111111111112
        currency:
          type: object
          description: Currency
          example: NGN
        amount:
          type: number
          description: Mint Amount
          example: 100000
        usdcAmount:
          type: number
          description: Usdc Amount
          example: 100
        fiatAmount:
          type: number
          description: Fiat Amount
          example: 100
        sender:
          type: string
          description: Wallet Public Key
          example: 4KSLE7EU1P7PQ8Rc4hdb2ZKq2JmWHD8UXJp7guEdyT9j
        recipient:
          type: string
          description: Recipient Public Key
          example: 4KSLE7EU1P7PQ8Rc4hdb2ZKq2JmWHD8UXJp7guEdyT9j
        rate:
          type: number
          description: Rate of currency to usdc
          example: 9
        status:
          type: object
          description: Transaction Status
          example: PENDDING
        transactionType:
          type: object
          description: Transaction Type
          example: OFF_RAMP
        createdAt:
          format: date-time
          type: string
          description: Transaction creation date
          example: '2026-09-28T14:55:27.097Z'
        accountNumber:
          type: string
          description: Account Number (for onramp transactions)
          example: '0025635480'
        accountName:
          type: string
          description: Account Name (for onramp transactions)
          example: Paj Inc.
        bank:
          type: string
          description: Bank Name (for onramp transactions)
          example: First Bank
        fee:
          type: number
          description: Transaction fee in usdc
          example: 0.2
        chain:
          type: object
          description: Chain
          example: SOLANA
      required:
        - id
        - address
        - signature
        - mint
        - currency
        - amount
        - usdcAmount
        - fiatAmount
        - sender
        - recipient
        - rate
        - status
        - transactionType
        - createdAt
        - accountNumber
        - accountName
        - bank
        - fee
        - chain
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````

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