# Record payment

Record offline payments associated payment links. It will increase the received amount field and going to reduce the pending amount.

####

#### **Method**

```
POST https://api.ninjapay.me/webextension/api/v1/fiat/realtime-payment-link/record-payment
```

#### **Parameters**

* **link\_id**: `String` - Payment link id, generate on create real time payment link(required)
* **amount**: `Number` - Amount of need to generate.(required)

| Parameters | Important points                                                         |
| ---------- | ------------------------------------------------------------------------ |
| amount     | Amount can pass less than payment link amount only when partial is true. |

```javascript

Body (application/json)
 {

    "link_id": "Link id of payment link",
    "amount": 100.00
}

```

#### **Response**

```json
{
    "status": true,
    "data": {},
    "message": "Record added !"
}
```

#### **Code Example**

{% code overflow="wrap" %}

```javascript

const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key':'API_KEY'
  },
  body: '{ "link_id": "Link id of payment link", "amount": 100}'
};

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

{% endcode %}


---

# 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-upi/plugins/realtime-payment-links/record-payment.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.
