# Payment Details

To make this request, send an authenticated request to the fetchtrans endpoint.

## Get details of a transaction

<mark style="color:blue;">`GET`</mark> `https://api.oneappgo.com/v1/business/fetchtrans`

#### Path Parameters

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| reference<mark style="color:red;">\*</mark> | String |             |

Take a look at how you might do this:

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

```php
curl --location --request GET 'https://api.oneappgo.com/v1/business/fetchtrans?reference=63490b1643370903287' \
--header 'Authorization: Bearer YOUR_SECRET_KEY'
```

{% endtab %}

{% tab title="NodeJs" %}

```javascript
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'api.oneappgo.com',
  'path': '/v1/business/fetchtrans?reference=63490b1643370903287',
  'headers': {
    'Authorization': 'Bearer YOUR_SECRET_KEY'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();
```

{% endtab %}

{% tab title="PHP - cURL" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.oneappgo.com/v1/business/fetchtrans?reference=63490b1643370903287',
  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 YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.oneappgo.com/v1/business/fetchtrans?reference=63490b1643370903287"

payload={}
headers = {
  'Authorization': 'Bearer YOUR_SECRET_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}
{% endtabs %}

## Sample response

```json
{
    "status": true,
    "message": "Successful",
    "transtatus": "Completed",
    "transid": "1000865",
    "ownerid": "63490",
    "amount": "300.00",
    "amount_settled": "292.80",
    "transfee": "7.20",
    "prevbal": "5118.75",
    "newbal": "5411.55",
    "currency": "NGN",
    "reference": "63490b1643370903287",
    "customer_reference": "2910_1643370902",
    "transaction_token": "cfda35a0d3a970fd47c57eda6c230ba1",
    "customer_email": "example@gmail.com",
    "customer_phone": "",
    "customer_name": " ",
    "payment_channel": "rave",
    "paid_through": "api",
    "mode": "test",
    "attempt": 1,
    "cardtype": "",
    "country": "",
    "cardnumber": "",
    "bankname": "",
    "errors": 0,
    "payment_time": "28, Fri. Jan. 2022",
    "gateway": "Flutterwave",
    "gatewaylogo": "https://business.1app.online/app/img/flutter.png",
    "statustext": "Completed",
    "time_elapsed": "00:58"
}
```


---

# 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://docs.1app.online/v1/payments/payment-details.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.
