> 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/list-payment-links.md).

# List Payment Links

You need to create a 'charge' to receive payments through Ninjapay. A request contains both a <mark style="color:red;">Lightning Network BOLT11</mark> invoice, capable of accepting payments through the LN protocol, and a on-chain address for standard on-chain transactions.

#### **Method**

```

GET https://prod.ninjapay.me/uapi/v1/p2p/paymentLink/links

```

#### **Parameters**

```javascript

Body (application/json)
 {
  limit: number; // The number of payment links you need in response
}

```

#### **Response**

```json
[
   {
      "link_id": 198660213998,
      "amount": 9362.67,
      "amount_currency": "INR",
      "purpose": "sample_description",
      "payment_mode": "bank"; // "upi" and "bank" supported currently.
      "payment_mode_type": "secondary"; // "primary" and "secondary" supported currently. 
      "created_at": 1661215876,
      "payment_link": "https://bit.ly/3H24Msg", // Hosted checkout url.
      "callback_url": string; // Your webhook url for getting response on successuful payment.
      "success_url": string; // Redirected to this after success from hosted checkout.
      "order_id": string; 
      "extra": {
          "customer_name": "nakamoto",
          "email": "sample@sample.com",
          "total_fee": "0.00 inr (18%)"
      },
      "upi_info": {
          "upi_id": "merchantupi@icici", // null if payment_mode is bank
      },
      "bank_info": {
          "account_number": 001001553534,
          "name": "Nanda Neeraj",
          "ifsc": "icic0000060",
          "bank_name": "icici",
          "address": "vizag, dwarakanagar branch, 530024",
          "swift": "merchantupi@icici"
      },
      "other_info": {
          "paytm": "mypaytmid"
      }
  },
   {
      "link_id": 198660213997,
      "amount": 9362.67,
      "amount_currency": "INR",
      "purpose": "sample_description",
      "payment_mode": "bank"; // "upi" and "bank" supported currently.
      "payment_mode_type": "secondary"; // "primary" and "secondary" supported currently. 
      "created_at": 1661215871,
      "payment_link": "https://bit.ly/3H24Msg", // Hosted checkout url.
      "callback_url": string; // Your webhook url for getting response on successuful payment.
      "success_url": string; // Redirected to this after success from hosted checkout.
      "order_id": string; 
      "extra": {
          "customer_name": "nakamoto",
          "email": "sample@sample.com",
          "total_fee": "0.00 inr (18%)"
      },
      "upi_info": {
          "upi_id": "merchantupi@icici", // null if payment_mode is bank
      },
      "bank_info": {
          "account_number": null,
          "name": null,
          "ifsc": null,
          "bank_name": null,
          "address": null,
          "swift": null
      },
      "other_info": {
          "paytm": null
      }
  }
]
```

#### **Code Example**

{% code overflow="wrap" %}

```javascript

const options = {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'API_KEY'
  },
  body: '{"limit":10}'
};

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

{% endcode %}
