> For the complete documentation index, see [llms.txt](https://docs.switchappgo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.switchappgo.com/payments/transactions/retrieve-transaction.md).

# Retrieve Transaction

Retrieve a previously created transaction using its **`id`**.&#x20;

This returns the same response as a transaction verification except that the transaction **`id`** generated by SwitchApp is used in this case to retrieve the transaction record instead of your payment reference.

{% hint style="info" %}
**NOTE:** Transactions provide a source of truth for reconciliations. As such, they cannot be deleted. But you may hide or archive them.
{% endhint %}

{% openapi src="/files/D2OnIDDY2fzSVTk2AYNl" path="/v1/transactions/{id}" method="get" %}
[merchant-api-swagger-10-04-2023.json](https://163660187-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8qcR8TOKMHOvHEJFAJcO%2Fuploads%2Fz1Hkjfk2wl3pDM0TQvng%2Fmerchant-api-swagger-10-04-2023.json?alt=media\&token=79cc08f6-9596-401d-993c-32a29da7d56f)
{% endopenapi %}

{% tabs %}
{% tab title="curl" %}

```clike
curl https://api.switchappgo.com/v1/transactions/:transactionId \
    -H "authorization: 'bearer sk_test_nTgS42KNdKr6Ts798DT'"
    -X GET
```

{% endtab %}

{% tab title="node" %}

```javascript
const switchapp = require('switchapp')('sk_test_nTgS42KNdKr6Ts798DT');

const newTx = await switchapp.transactions.verify({
    txRef: transactionId
})
```

{% endtab %}
{% endtabs %}
