> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Check Transaction Status

> Poll GET /api/v1/transactions/payin/status with your order_id to confirm whether a payin transaction succeeded, failed, or is still pending.

Use this endpoint to verify the final state of a payment. Call it after initiating a transaction to confirm whether funds were successfully captured. The response includes the payment method used, the source account type, and, for UPI transactions, the bank's Retrieval Reference Number (RRN).

## Request Header

**x-api-key** `string` *required*

Your merchant secret key.

### Query Parameter

**order\_id** `string` *required*

The order ID you provided when initiating the collection.

## Sample Request

```sh Shell theme={"dark"}
curl --get 'https://api.bluswap.co/api/v1/transactions/payin/status' \
  --header 'x-api-key: YOUR_SECRET_KEY' \
  --data-urlencode 'order_id=YOUR_ORDER_ID'
```

```js Node.js theme={"dark"}
const response = await fetch(
  'https://api.bluswap.co/api/v1/transactions/payin/status?order_id=YOUR_ORDER_ID',
  {
    method: 'GET',
    headers: {
      'x-api-key': 'YOUR_SECRET_KEY'
    }
  }
);
console.log(await response.json());
```

```java Java theme={"dark"}
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.bluswap.co/api/v1/transactions/payin/status?order_id=YOUR_ORDER_ID"))
    .header("x-api-key", "YOUR_SECRET_KEY")
    .GET()
    .build();
HttpResponse<String> response = HttpClient.newHttpClient()
    .send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

```python Python theme={"dark"}
import requests

response = requests.get(
    "https://api.bluswap.co/api/v1/transactions/payin/status",
    headers={"x-api-key": "YOUR_SECRET_KEY"},
    params={"order_id": "YOUR_ORDER_ID"},
)
print(response.json())
```

```go Go theme={"dark"}
request, err := http.NewRequest(http.MethodGet, "https://api.bluswap.co/api/v1/transactions/payin/status?order_id=YOUR_ORDER_ID", nil)
if err != nil { panic(err) }
request.Header.Set("x-api-key", "YOUR_SECRET_KEY")
response, err := http.DefaultClient.Do(request)
if err != nil { panic(err) }
defer response.Body.Close()
```

```php PHP theme={"dark"}
<?php
$curl = curl_init('https://api.bluswap.co/api/v1/transactions/payin/status?order_id=YOUR_ORDER_ID');
curl_setopt_array($curl, [
    CURLOPT_HTTPHEADER => ['x-api-key: YOUR_SECRET_KEY'],
    CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

```ruby Ruby theme={"dark"}
require "net/http"

uri = URI("https://api.bluswap.co/api/v1/transactions/payin/status?order_id=YOUR_ORDER_ID")
request = Net::HTTP::Get.new(uri, {"x-api-key" => "YOUR_SECRET_KEY"})
puts Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request).body }
```

## Response

### Examples

> [tab] Card Payment Success
>
> ```json theme={"dark"}
> {
>     "status": "SUCCESS",
>     "status_code": "200",
>     "amount": "10.00",
>     "status_description": "Transaction completed successfully",
>     "account_type": "DEBIT_CARD",
>     "card_network": "VISA",
>     "payment_mode": "DEBIT_CARD"
> }
> ```

> [tab] UPI / QR Success
>
> ```json theme={"dark"}
> {
>     "status": "SUCCESS",
>     "status_code": "200",
>     "amount": "10.00",
>     "status_description": "Transaction completed successfully",
>     "account_type": "SAVINGS",
>     "card_network": "N/A",
>     "payment_mode": "QR",
>     "RRN": "605800410630"
> }
> ```

> [tab] Failure
>
> ```json theme={"dark"}
> {
>     "status": "FAILED",
>     "status_code": "200",
>     "amount": "10.00",
>     "status_description": "Transaction failed: TXN NOT COMPLETED",
>     "account_type": "N/A",
>     "card_network": "N/A",
>     "payment_mode": "QR",
>     "RRN": null
> }
> ```

> [tab] Initiated
>
> ```json theme={"dark"}
> {
>     "status": "INITIATED",
>     "status_code": "200",
>     "amount": "10.00",
>     "status_description": null,
>     "account_type": "N/A",
>     "card_network": "N/A",
>     "payment_mode": "DEBIT_CARD",
>     "RRN": null
> }
> ```

### Response Fields

**status** `String`

Terminal state of the transaction. One of `SUCCESS`, `FAILED`, or `INITIATED`.

**status\_code** `String`

Numeric status indicator (e.g., `200`).

**amount** `String`

The exact amount captured for this transaction (e.g., `10.00`).

**status\_description** `String`

Human-readable message describing the outcome of the transaction.

**payment\_mode** `String`

The payment method used. Possible values: `QR`, `DEBIT_CARD`, `CREDIT_CARD`, `VPA`, `INTENT`.

**account\_type** `String`

Source account type from which the payment was made (e.g., `SAVINGS`, `DEBIT_CARD`).

**card\_network** `String`

The card network provider (e.g., `VISA`, `MASTERCARD`). Returns `N/A` for UPI transactions.

**RRN** `String`

Retrieval Reference Number the bank's unique identifier for this transaction. Populated for successful UPI transactions only.

> [!WARNING]
>
> Treat an initiated payment as pending. Fulfil the order only after receiving a `SUCCESS` status via webhook or the status endpoint.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.