---
api: 'Business API'
---

# Retrieve a transaction

Retrieve the details of a specific transaction.
The details can include, for example, cardholder details for card payments.

You can retrieve a transaction with its details either by its **transaction ID** or by the **request ID** that was provided for this transaction at the time of its creation, for example, when you [created a payment](/docs/api/business#create-payment).

- To retrieve a transaction by its **transaction ID**, use:

  `/transaction/{transaction_id}`

- To retrieve a transaction by a **request ID** provided at transaction creation, use:

  `/transaction/{request_id}?id_type=request_id`

  :::warning
  Due to idempotency expiry, only transactions created within the last 2 weeks can be retrieved using their `request_id`.
  :::

For more details, see the guides: [Retrieve transaction data](/docs/guides/manage-accounts/accounts-and-transactions/retrieve-transactions).

## Endpoint

GET `/transaction/{id}`

## Parameters

### path parameters

- `id` (string, required)
  The ID of the transaction, or the [request ID](/docs/api/business#create-payment#response) provided at payment creation if `id_type` = `request_id`.

### query parameters

- `id_type` (enum, optional)
  The type of the ID to retrieve the transaction by.
  Possible enum values:

  - `request_id`

## Returns

### 200

The information about a specific transaction

#### Response attributes

- `id` (string)
    The ID of the transaction.
- `type` (enum)
    Indicates the transaction type.
    Possible enum values:

    - `atm`
    - `card_payment`
    - `card_refund`
    - `card_chargeback`
    - `card_credit`
    - `charge`
    - `charge_refund`
    - `exchange`
    - `transfer`
    - `loan`
    - `fee`
    - `refund`
    - `topup`
    - `topup_return`
    - `tax`
    - `tax_refund`
- `request_id` (string, optional)
    The request ID that you provided previously.
- `state` (enum)
    Indicates the transaction state. Possible values:
      - `created`: The transaction has been created and is either processed asynchronously or scheduled for a later time.
      - `pending`: The transaction is pending until it's being processed. If the transfer is made between Revolut accounts, this state is skipped and the transaction is executed instantly.
      - `completed`: The transaction was successful.
      - `declined`: The transaction was unsuccessful. This can happen for a variety of reasons, for example, insufficient account balance, wrong receiver information, etc.
      - `failed`: The transaction was unsuccessful. This can happen for a variety of reasons, for example, invalid API calls, blocked payments, etc.
      - `reverted`: The transaction was reverted. This can happen for a variety of reasons, for example, the receiver being inaccessible.
    Possible enum values:

    - `created`
    - `pending`
    - `completed`
    - `declined`
    - `failed`
    - `reverted`
- `reason_code` (string, optional)
    The reason code when the transaction `state` is `declined` or `failed`.
- `created_at` (string)
    The date and time the transaction was created in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
- `updated_at` (string)
    The date and time the transaction was last updated in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
- `completed_at` (string, optional)
    The date and time the transaction was completed in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. 
    This is required when the transaction `state` is `completed`.
- `scheduled_for` (string, optional)
    The scheduled date of the payment, if applicable.
    Provided in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
- `related_transaction_id` (string, optional)
    The ID of the original transaction to which this transaction is related. 
    Returned, for example, when this transaction is a refund of the related transaction, or for transactions related to cashback.
- `merchant` (object, optional)
    The information about the merchant (only for card transactions).
  - `merchant.id` (string, optional)
      The ID of the merchant.
  - `merchant.name` (string, optional)
      The name of the merchant.
  - `merchant.city` (string, optional)
      The city of the merchant.
  - `merchant.category_code` (string, optional)
      The category code of the merchant.
  - `merchant.country` (string, optional)
      The bank country of the merchant, provided as an [ISO 3166](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) code.
      Typically 3 letters, though in some cases, card networks might provide it as a 2-letter code.
- `reference` (string, optional)
    The payment reference.
- `legs` (array of object)
    The legs of the transaction:
    - For transactions between your Revolut accounts, there can be 2 legs, for example, an internal transfer made out of the GBP account and into the EUR account.
    - For transactions in other cases, there is only 1 leg.
  - `legs[].leg_id` (string)
      The ID of the leg.
  - `legs[].amount` (number)
      The amount of the transaction.
  - `legs[].fee` (number, optional)
      The amount of the transaction fee.
  - `legs[].currency` (string)
      [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code in upper case.
  - `legs[].bill_amount` (number, optional)
      The billing amount for cross-currency payments.
  - `legs[].bill_currency` (string, optional)
      [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code in upper case.
  - `legs[].account_id` (string)
      The ID of the account that the transaction is associated with.
  - `legs[].counterparty` (object, optional)
    - `legs[].counterparty.account_id` (string, optional)
        The ID of the counterparty account.
    - `legs[].counterparty.account_type` (enum)
        Indicates the type of the account.
        Possible enum values:

        - `self`
        - `revolut`
        - `external`
    - `legs[].counterparty.id` (string, optional)
        The ID of the counterparty.
  - `legs[].description` (string, optional)
      The transaction leg purpose.
  - `legs[].balance` (number, optional)
      The total balance of the account that the transaction is associated with.
- `card` (object, optional)
    The details of the card associated with the transaction.
  - `card.id` (string, optional)
      The ID of the card.
  - `card.card_number` (string, optional)
      The masked card number.
  - `card.first_name` (string, optional)
      The first name of the cardholder.
  - `card.last_name` (string, optional)
      The last name of the cardholder.
  - `card.phone` (string, optional)
      The phone number of the cardholder in [E.164](https://en.wikipedia.org/wiki/E.164) format.
  - `card.references` (array of object, optional)
      Card references ([`references`](/docs/api/business#get-card#response)).
      
      :::note
      These are the references that were assigned to the card at the time the transaction was made.
      Any [update](/docs/api/business#update-card-references) to card references does not affect existing transactions.
      :::
    - `card.references[].name` (string)
        The name of the card reference.
        Must be unique.
    - `card.references[].value` (string)
        The value for this reference.
