# 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`** // 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" // 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).


---

# 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://ninjapay.gitbook.io/ninjapay-api-docs/how-to/api-reference-p2p/plugins/paywalls/check-paywall.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.
