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

# Get transaction

> This endpoint gets a transaction using a transactionId.

### Query

<ParamField query="id" type="string">
  This is the ID of the transaction
</ParamField>

### Response

<ResponseField name="success" type="number">
  Indicates whether the call was successful. 1 if successful, 0 if not.
</ResponseField>

<ResponseField name="data" type="object">
  The contents of the transaction

  <Expandable title="Toggle object">
    <ResponseField name="transaction_id" type="number">
      The unique id of the transaction
    </ResponseField>

    <ResponseField name="clientreference_id" type="number">
      The id that your system uses to identify the transaction
    </ResponseField>

    <ResponseField name="batch_id" type="number">
      The batch id of the transaction. This is useful if it was sent as part of a bulk/batch payment
    </ResponseField>

    <ResponseField name="account_number" type="number">
      This is the name of the user group provided in the request body.
    </ResponseField>

    <ResponseField name="name" type="string">
      name of person or business that did transaction
    </ResponseField>

    <ResponseField name="currency" type="string">
      Currency of the transaction
    </ResponseField>

    <ResponseField name="amount" type="number">
      Amount of the transaction
    </ResponseField>

    <ResponseField name="fees" type="string">
      fees on the transaction
    </ResponseField>

    <ResponseField name="initiator" type="string">
      Who initiated the transaction
    </ResponseField>

    <ResponseField name="approver" type="string">
      Who approved the transaction
    </ResponseField>

    <ResponseField name="attachments" type="object">
      Documents attached to transaction
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Example Request theme={null}
  curl --location --request GET 'https://api.xente.co/transactions/{id}' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \

  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "code": 0,
      "message": "Transaction retrieved successfully",
      "data": {
          "transactionId": "673cb118-fa10-462c-e1c0-08dc377e93f9",
          "requestId": "323333543589",
          "batchId": "batch5678",
          "accountNumber": "6",
          "name": null,
          "currency": "UGX",
          "amount": -1000.00,
          "transactionType": "PAYOUT",
          "product": {
              "id": "MTNMOBILEMONEYPAYOUTUG",
              "name": "Send mobile money"
          },
          "beneficiary": {
              "id": "1223",
              "name": "Jane Doe",
              "data": {
                  "CustomerReference": "+1234567890",
                  "CustomerPhone": "+1234567890",
                  "CustomerEmail": "johndoe@example.com",
                  "Memo": "Payment received for invoice #1234"
              }
          }
      }
  }
  ```
</ResponseExample>
