# Check Paywall

Check the status of a particular paywall using the transaction ID.

#### **Method**

```
POST https://api.ninjapay.me/webextension/api/v1/fiat/paywall/trx-status
```

#### **Parameter**

**`order_id:`** `(string, required)` // the transaction ID of the paywall you can get this in paywall QR api.

#### Request  body

```javascript
Body (application/json)
{
    "order_id":"FT_RTPL_SOxhqQxplFGgtuopkzHIBg" // REQUIRED transaction order id
}
```

#### **Response**

```json
{
    "status": true,
    "data": {
        "trxStatus": "SUCCESS",
        "payload": {
            "price": "1",
            "title": "27 July Trailer",
            "content": "",
            "content_type": "URL",
            "hide_url": false,
            "currency": "INR",
            "extras": {}
        }
    },
    "message": "Received payment"
}
```

#### **Code Example**

```jsx

const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'API_KEY' // Invoice key
  },
  body: '{"order_id": "FT_RTPL_SOxhqQxplFGgtuopkzHIBg"}'
};

fetch('https://api.ninjapay.me/webextension/api/v1/fiat/paywall/trx-status', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  
```

If the payment status is Pending, then Check Status API should be called in the following interval: \
The first status check at 20-25 seconds post transaction start, then \
Every 3 seconds once for the next 30 seconds, \
Every 6 seconds once for the next 60 seconds, \
Every 10 seconds for the next 60 seconds, \
Every 30 seconds for the next 60 seconds, and then \
Every 1 min until timeout (10 mins).
