# Refund Transaction Status (TSQ)

| Authorization | Set value to \`Bearer SECRET\_KEY |
| ------------- | --------------------------------- |
| Content-type  | Set value to `application/json`   |

<details>

<summary>BaseUrl</summary>

Sandbox/PROD : <https://api.startbutton.tech&#x20>;

</details>

> GET: `{{baseurl}}/transaction/refunds/:query/status`

{% hint style="info" %}
The secret key can be gotten from the 'Settings' page on your Startbutton dashboard.
{% endhint %}

| Query key            | Required? | Description                                                                                                                                                                                                                                                                                                                                  |
| -------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| transactionReference | Yes       | <p>This can be either:<br><br>1. the <code>refund transaction</code> reference. This reference provides the details and status of the refund processed.<br><br>2. the <code>original transaction</code> reference. This reference provides a list of all refunds associated with the transaction (in cases of multiple partial refunds).</p> |

{% hint style="info" %}
The `refund transaction` reference can be obtained from the email you receive after a Refund is processed or from the Refunds tab on the Dashboard, while the `original transaction` reference can be obtained from the Dashboard or webhook notification.
{% endhint %}

#### Sample response:

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

```
{
    "success": true,
    "message": "Refund Transaction fetched successfully",
    "data": {
        "refund": {
            "type": "full",
            "_id": "65d7356de4e2a1cxxxxxxx",
            "merchant": "65d5e4f44ef2d99xxxxxxxx",
            "transactionReference": "dfa61b8b95a9",
            "amount": 1000,
            "reference": "Rdfa61b8b95a9-c4cmjvfndg-1",
            "currency": "NGN",
            "channel": "dashboard",
            "party": "xxxxx",
            "reason": "customer disputes",
            "status": "successful",
            "createdAt": "2024-02-22T11:52:13.371Z",
            "updatedAt": "2024-02-22T12:19:05.507Z",
            "__v": 0,
            "meta": {}
        },
        "transaction": {
            "_id": "65d6467306037xxxxxxx",
            "transType": "collection",
            "status": "reversed",
            "toAmount": 100000,
            "toCurrency": "NGN",
            "merchantId": "65d5e4f44ef2dxxxxxxxxx",
            "transactionReference": "dfa61b8xxxx",
            "customerEmail": "test+customer101@startbutton.africa",
            "paymentPartnerId": "644a475218872xxxxxxxxxxx",
            "paymentCode": "9085ccxxxxxx",
            "isRecurrent": false,
            "postProcess": null,
            "settleCurrency": "NGN",
            "paymentRateComboId": "65d618930603xxxxxxx",
            "customEmails": [],
            "createdAt": "2024-02-21T18:52:35.445Z",
            "updatedAt": "2024-02-22T12:38:07.579Z",
            "exchangeRate": 1,
            "usdBuyRate": 1,
            "usdSellRate": 1,
            "feeAmount": 2600,
            "paidAt": "2024-02-21T18:59:50.266Z",
            "toWallet": "65d643a115f808f07c5e3e80",
            "meta": {
                "refunds": {
                    "amount": 100000,
                    "transactions": 1
                }
            },
            "fromBalanceAfterLedger": 0,
            "fromBalanceAfterAvailable": 0
        }
    }
}
```

{% endtab %}

{% tab title="Incorrect transaction reference" %}

```
{
    "success": true,
    "message": "Transaction not found"
}
```

{% endtab %}
{% endtabs %}


---

# 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://startbutton.gitbook.io/startbutton-product-api/startbutton-api-doc/refunds/refund-transaction-status-tsq.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.
