> For the complete documentation index, see [llms.txt](https://ninjapay.gitbook.io/ninjapay-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ninjapay.gitbook.io/ninjapay-api-docs/how-to/api-reference-p2p/plugins/payment-links-p2p/approve-decline.md).

# 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!
