# Approve/Decline

Request to sends a payment from a wallet. The application needs to provide an address or Ninjapay username.

#### **Method**

```

POST https://prod.ninjapay.me/uapi/v1/p2p/paymentLink/statusUpdate

```

#### **Parameters**

```javascript
Body (application/json)
 {
  tid: string; // the transaction ID of the payment
  status: int // pending(0), approve(1), decline(2)
}
```

#### **Other info**

| Parameters | Input options |
| ---------- | ------------- |
| `status`   | `0`, `1`, `2` |

#### **Response**

```json
{"http_status": <int>} // 200, 201, 400...
```

#### **Example**

{% code overflow="wrap" %}

```javascript

const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'API_KEY'
  },
  body: '{"tid":"A18209856328","status":1}'
};

fetch('https://prod.ninjapay.me/uapi/v1/p2p/paymentLink/statusUpdate', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  
  
```

{% endcode %}

**Note:** You need to use `Admin key` for this request!


---

# 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/payment-links-p2p/approve-decline.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.
