# 4. Get transaction status

`GET https://api.royalpe.site/merchant/transaction-status`

Retrieve the status and details of a pay-in transaction belonging to the authenticated merchant.

## Query parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `accessKey` | string | Yes | Merchant access key |
| `secretKey` | string | Yes | Merchant secret key |
| `transactionId` | string | Yes | Gateway transaction identifier |

## Request example

```http title="HTTP"
GET /merchant/transaction-status?accessKey=YOUR_ACCESS_KEY&secretKey=YOUR_SECRET_KEY&transactionId=RP-7f3a9c21d84e5b02
```

```bash title="cURL"
curl "https://api.royalpe.site/merchant/transaction-status?accessKey=YOUR_ACCESS_KEY&secretKey=YOUR_SECRET_KEY&transactionId=RP-7f3a9c21d84e5b02"
```

```python title="Python"
import os, requests

data = requests.get("https://api.royalpe.site/merchant/transaction-status", params={
    "accessKey": os.environ["ROYALPAY_ACCESS_KEY"],
    "secretKey": os.environ["ROYALPAY_SECRET_KEY"],
    "transactionId": "RP-7f3a9c21d84e5b02",
}, timeout=15).json()["data"]
```

## Success response (HTTP 200)

```json title="200"
{
  "success": true,
  "message": "Transaction status retrieved successfully",
  "data": {
    "transactionId": "RP-7f3a9c21d84e5b02",
    "status": "approved",
    "amount": 1000.5,
    "remarks": "Payment successful",
    "updatedAt": "2026-11-30T10:30:00.000Z",
    "orderId": "ORDER123",
    "userId": "USER456",
    "utrNumber": "123456789012"
  }
}
```

| `data` field | Description |
|---|---|
| `transactionId` | Gateway transaction identifier |
| `status` | Current payment status (below) |
| `amount` | Transaction amount in rupees |
| `remarks` | Additional notes, nullable: `Payment successful`, the rejection reason, or the cancellation reason |
| `updatedAt` | Last status update, ISO timestamp (UTC) |
| `orderId` | Merchant order ID |
| `userId` | Customer identifier |
| `utrNumber` | UTR/reference number, nullable until the customer submits it |

A [pay-in webhook](https://docs.royalpe.site/payin/webhook) carries the same object.

## Payment status values

| Value | Final | Meaning |
|---|---|---|
| `progress` | no | Payment created, waiting for customer action |
| `pending` | no | Payment submitted, awaiting verification |
| `approved` | yes | Payment confirmed: credit the customer, once |
| `rejected` | yes | Payment rejected; `remarks` says why |
| `cancelled` | yes | Ended before any payment proof was submitted: the customer cancelled (`Cancelled by the payer`), left the checkout (`Payer left the checkout`), or it stopped responding for 30 minutes (`Checkout timed out: …`) |

```text title="Lifecycle"
progress ──proof submitted──▶ pending ──verified──▶ approved
    │                            └──not accepted──▶ rejected
    └──cancelled / left / timed out──▶ cancelled
```

A `pending` pay-in can receive a corrected UTR, which restarts verification. `approved`, `rejected` and `cancelled` never change again.

## Error responses

```json title="Error"
{ "success": false, "message": "Access key is required" }
```

| HTTP code | Message |
|---|---|
| 400 | `Access key is required`, `Secret key is required`, `transactionId is required` |
| 401 | `Invalid access key or secret key` |
| 403 | `Transaction does not belong to this merchant` |
| 404 | `Transaction not found` |
| 500 | `Something went wrong` |

All three query parameters are validated and required. Access is restricted to the authenticated merchant's own transactions. Webhooks remain the main way to learn results: poll a transaction at most every 10 seconds.

---

Source: https://docs.royalpe.site/payin/transaction-status · All docs: https://docs.royalpe.site/llms-full.txt · Updated 2026-11-30
