# Transaction Status

Alternative to listening to events by using a webhook URL, you can request/call for the transaction status. This requires making a `GET` request at regular intervals to get the final status of a request.

<details>

<summary>BaseUrl</summary>

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

</details>

GET - `{{baseurl}}/transaction/status/:reference`

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

{% tabs %}
{% tab title="Sample payload for transfer" %}

```
{
    "success": true,
    "message": "transaction fetched",
    "data": {
        "transaction": {
            "gatewayReference": null,
            "_id": "64f42c68ecfd2f6f1xxxxxxx",
            "transType": "transfer",
            "status": "pending",
            "feeAmount": 1500,
            "merchantId": "64459778bf350cc65xxxxxxx",
            "transactionReference": "1481fxxxxxxx",
            "userTransactionReference": "aedxxxx",
            "isRecurrent": false,
            "createdAt": "2023-09-03T06:49:12.509Z",
            "updatedAt": "2023-09-03T06:51:11.016Z",
            "amount": 100,
            "currency": "NGN",
            "recipient": {
                "recipientName": "John Doe",
                "currency": "NGN",
                "institutionType": "nuban",
                "institutionName": "Providus Bank",
                "institutionNumber": "54004xxxxx",
                "_id": "64f33cca80649e4fxxxxxxx"
            }
        },
        "authorizationCode": null
    }
}
```

{% endtab %}

{% tab title="Sample Payload for collection (Re-charge disabled)" %}

```
{
    "success": true,
    "message": "transaction fetched",
    "data": {
        "transaction": {
            "_id": "64fb69a68a6f0187bxxxxxxx",
            "transType": "collection",
            "status": "successful",
            "merchantId": "64459778bf350cc65xxxxxxx",
            "transactionReference": "401f69xxxxxx",
            "userTransactionReference": "aedxxxx",
            "customerEmail": "test1@email.com",
            "paymentCode": "ugjhxxxxx",
            "isRecurrent": false,
            "postProcess": null,
            "gatewayReference": null,
            "createdAt": "2023-09-08T18:36:22.214Z",
            "updatedAt": "2023-09-08T18:59:00.375Z",
            "feeAmount": 12.5,
            "amount": 50000,
            "currency": "NGN"
        },
        "authorizationCode": null
    }
}
```

{% endtab %}

{% tab title="Sample Payload for collection (Re-charge enabled)" %}

```
{
    "success": true,
    "message": "transaction fetched",
    "data": {
        "transaction": {
            "_id": "64fb69a68a6f0187bxxxxxxx",
            "transType": "collection",
            "status": "successful",
            "merchantId": "64459778bf350cc65xxxxxxx",
            "transactionReference": "401f69xxxxxx",
            "userTransactionReference": "aedxxxx",
            "customerEmail": "test1@email.com",
            "paymentCode": "ugjhvjhvv",
            "isRecurrent": false,
            "postProcess": null,
            "gatewayReference": null,
            "createdAt": "2023-09-08T18:36:22.214Z",
            "updatedAt": "2023-09-08T18:59:00.375Z",
            "feeAmount": 12.5,
            "amount": 50000,
            "currency": "NGN"
        },
        "authorizationCode": "5cb5047xxxxxxx"
    }
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
`amount` is in fractional unit&#x20;
{% endhint %}


---

# 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/transaction-status.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.
