# Retrieve a sales transaction

`GET https://api.cademi.com.br/api/v3/sales/transactions/{transaction_id}`

Operation ID: `sales_transactions.get` · API v3

Retrieves a sales transaction, which aggregates the events of a single sale or subscription.

A transaction is addressed only by its own ID. IDs of later events in the same transaction return `404 Not Found`.

Required permissions: `sales_events.read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `transaction_id` | path | string | yes |  |

## Responses

### 200

Returns the requested sales transaction.

Body: `data`: SalesTransaction.

Fields of SalesTransaction:

| Field | Type | Required | Description |
|---|---|---|---|
| `amount` | string or null | yes | Amount from the most recent event, exactly as sent by the gateway. |
| `currency` | string or null | yes | Currency of the transaction, or null when the gateway event does not include one. |
| `delivery_id` | string or null | yes |  |
| `enrollment_ids` | array of string | yes |  |
| `events_count` | integer | yes |  |
| `external_id` | string or null | yes |  |
| `external_product_id` | string or null | yes |  |
| `first_event_at` | string or null (date-time) | yes |  |
| `gateway` | string | yes |  |
| `id` | string | yes | Public ID, with the trx_ prefix. Derived from the first event of the transaction; it does not change when new events arrive. |
| `last_event_at` | string or null (date-time) | yes |  |
| `object` | string, one of `sales_transaction` | yes |  |
| `status` | string, one of `trial`, `approved`, `canceled`, `refunded`, `past_due`, `awaiting_payment`, `awaiting_review`, `expired`, `abandoned`, `ignored`, `unknown` | yes |  |
| `subscription_external_id` | string or null | yes |  |
| `user_id` | string or null | yes |  |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The sales transaction was not found or is not accessible with the current credentials.

Body: Error.

Full schema: https://cademi.dev/openapi/v3.json
