# Get details of a transaction

{% hint style="info" %} <mark style="color:blue;">Using Duplo's</mark> <mark style="color:blue;"></mark><mark style="color:blue;">`transaction_ref`</mark><mark style="color:blue;">, you can fetch detailed information of a transaction</mark>.
{% endhint %}

### URI

&#x20;<mark style="color:green;background-color:green;">**GET**</mark>&#x20;

{% code overflow="wrap" %}

```
https://api.tryduplo.com/v1/wallets/transactions/:transaction_ref?business_id={{business_id}}
```

{% endcode %}

### Parameters

#### Header

<table data-header-hidden><thead><tr><th width="536"></th><th></th></tr></thead><tbody><tr><td><strong>Authorization</strong><br><code>string</code></td><td>set value to <code>Bearer SECRET_KEY</code></td></tr></tbody></table>

#### Query Param

<table data-header-hidden><thead><tr><th width="260"></th><th></th></tr></thead><tbody><tr><td><strong>business_id</strong><br><code>string</code> <mark style="color:red;"><code>required</code></mark></td><td>Merchant Business ID</td></tr></tbody></table>

#### Path Param

<table data-header-hidden><thead><tr><th width="260"></th><th></th></tr></thead><tbody><tr><td><strong>transaction_ref</strong><br><code>string</code> <mark style="color:red;"><code>required</code></mark></td><td>Transaction reference</td></tr></tbody></table>

### Sample request

{% tabs %}
{% tab title="cURL" %}
{% code overflow="wrap" %}

```bash
curl --location --request GET 'https://api.tryduplo.com/v1/wallets/transactions/:transaction_ref?business_id={{business_id}} \
--header 'Authorization: Bearer SECRET_KEY'
```

{% endcode %}
{% endtab %}

{% tab title="Node" %}
{% code overflow="wrap" lineNumbers="true" %}

```javascript
var axios = require('axios');

var config = {
 method: 'get',
 url: 'https://api.tryduplo.com/v1/wallets/transactions/:transaction_ref?business_id={{business_id}},
 headers: {
   'Authorization': 'Bearer SECRET_KEY'
 }
};

axios(config)
.then(function (response) {
 console.log(JSON.stringify(response.data));
})
.catch(function (error) {
 console.log(error);
});
```

{% endcode %}
{% endtab %}

{% tab title="PHP" %}
{% code overflow="wrap" lineNumbers="true" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
 CURLOPT_URL => 'https://api.tryduplo.com/v1/wallets/transactions/:transaction_ref?business_id={{business_id}}',
 CURLOPT_RETURNTRANSFER => true,
 CURLOPT_ENCODING => '',
 CURLOPT_MAXREDIRS => 10,
 CURLOPT_TIMEOUT => 0,
 CURLOPT_FOLLOWLOCATION => true,
 CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
 CURLOPT_CUSTOMREQUEST => 'GET',
 CURLOPT_HTTPHEADER => array(
   'Authorization: Bearer SECRET_KEY'
 ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Duplo Response

```json
{
   "data": {
       "currency": "NGN",
       "description": "Test notification",
       "account_number": "8880000566",
       "amount": 1000,
       "business_id": "8ed10fcc-1e1c-4ad1-9ed8-e870d6543349",
       "status": "successful",
       "provider_ref_id": "Wema Bank",
       "type": "debit",
       "channel": "in-system",
       "date": "2022-07-08T10:28:04.881Z",
       "transaction_ref": "tran_aV29xF0RmwSc",
       "wallet_ref": "wal_1Lex3jObH8kC",
       "vat": 0,
       "fee_amount": 0,
       "settled_amount": 0,
       "account_ref": "act_kcOwyEeCTAcc",
       "account": "629ef8f453ee38000d0dd313",
       "new_balance": 27958.9,
       "multiple_source_details": [],
       "category": "wallet_transfer"
   },
   "errors": {},
   "message": "Record retrieved successfully"
}
```
