# Verify checkout transaction

### URI

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

```
https://api.tryduplo.com/v1/checkout/verify-transaction/:checkout_reference?business_id={YOUR_VALUE}
```

### Parameters

#### Header

<table data-header-hidden><thead><tr><th width="171"></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="267"></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="267"></th><th></th></tr></thead><tbody><tr><td><strong>checkout_reference</strong>         <br><code>string</code>   <mark style="color:red;"><code>required</code></mark></td><td>Checkout reference</td></tr></tbody></table>

{% hint style="info" %} <mark style="color:blue;">The customer will only be allowed to pay the exact amount, any other amount will be rejected.</mark>
{% endhint %}

### Sample request

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

```bash
curl --location --request GET 'https://api.tryduplo.com/v1/checkout/verify-transaction/che_igdOMXRCwW1G?business_id={YOUR_VALUE}' \
--header 'dpmlekdno: swwje4t343643'
```

{% endcode %}

{% endtab %}

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

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

var config = {
  method: 'get',
  url: 'https://api.tryduplo.com/v1/checkout/verify-transaction/che_igdOMXRCwW1G',
  headers: { 
    'dpmlekdno': 'kuuwwmwje4t3643'
  }
};

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/checkout/verify-transaction/che_igdOMXRCwW1G',
  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(
    'dpmlekdno: swyriewje84nxtmq94'
  ),
));

$response = curl_exec($curl);

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

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

### Duplo Response

<pre class="language-json"><code class="lang-json"><strong>{
</strong>  "data": {
    "checkout_transaction_details": {
      "source_details": {
        "bank_name": "Fidelity",
        "account_name": "Manni Ben",
        "account_number": "7218000007"
      },
      "receiver_details": {
        "bank_name": "Wema Bank",
        "account_name": "Daniel Doe",
        "account_number": "8890000062"
      },
      "_id": "635c9ff39f6f800dc44299",
      "currency": "NGN",
      "created_at": "2022-09-15T07:45:18.953Z",
      "updated_at": "2022-09-15T07:45:18.953Z",
      "new_balance": "14750",
      "account_number": "8890000062",
      "session_id": "878837230723606234664390001888004118416997121",
      "provider_ref_id": "19996142384749099704008266091707899121010",
      "type": "credit",
      "channel": "nip",
      "description": "PURCHASE DEPOSIT FOR XOA",
      "business_id": "8ed1cc-1e1c-4ad1-9ed8-e870d6543349",
      "account": "632251552d96e7000d597681",
      "account_ref": "act_aO7yrjAIHnIy",
      "wallet_ref": "wal_eV9nNyLc54oO",
      "status": "successful",
      "transaction_ref": "tran_IwUsE63IwOIT",
      "fee_amount": "0",
      "settled_amount": "1200",
      "amount": "1200",
      "date": "2022-09-15T07:45:18.953Z",
      "category": "pay-with-transfer",
      "multiple_source_details": [],
      "__v": 0
    }
  },
  "errors": {},
  "message": "Request successful"
}
</code></pre>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.tryduplo.com/duplo-api-documentation/payment-apis/duplo-checkout/verify-checkout-transaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
