> 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/verify-transaction.md).

# Verify transaction

After initializing a transaction, you transfer control to your customer to complete payment. Hence, online payments require you to always run a verification check even if you are informed that payment has been completed.

Transaction verification provides a way for you to confirm the status of a transaction. A transaction may be in a **`processing`** state if payment processor networks are having a slow day. However, once a transaction is completed, a verification request will let you know if it was successful or failed.

{% hint style="info" %}
**NOTE:** If a verified transaction is successful, you can give value to your customer as SwitchApp guarantees that payment has been received.
{% endhint %}

{% openapi src="/files/yNYfxvOAS2AtEzGrJBGd" path="/v1/transactions/verify/{tx\_ref}" method="get" %}
[merchant-api-swagger-10-04-2023 - 1.json](https://163660187-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8qcR8TOKMHOvHEJFAJcO%2Fuploads%2FiV9fw9tqYE1MwAdHKqX2%2Fmerchant-api-swagger-10-04-2023%20-%201.json?alt=media\&token=babc9855-c331-49bb-b3b5-09e307e42cbd)
{% endopenapi %}

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

```clike
curl https://api.switchappgo.com/v1/transactions/verify/{reference} \
    -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({
    tx_ref: 'YOUR_REFERENCE'
})
```

{% endtab %}
{% endtabs %}
