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

# 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 %}
