> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Icons

> Download standardised Cashfree payment icons for cards, netbanking, wallets, and UPI in multiple sizes and formats to build polished custom checkout pages.

The Payments icons library provides standardised payment method icons that you can use when building custom payment pages. This library supports various payment methods including cards, net banking, wallets, and UPI, available in multiple sizes and formats.

<Frame>
  <div style={{display: 'flex', gap: '16px', flexWrap: 'wrap', alignItems: 'center'}}>
    <img height="32" src="https://cashfreelogo.cashfree.com/assets_images/pg/card/svg/amex.svg" alt="American Express" />

    <img height="32" src="https://cashfreelogo.cashfree.com/assets_images/pg/card/svg/visa.svg" alt="Visa" />

    <img height="32" src="https://cashfreelogo.cashfree.com/assets_images/pg/card/svg/diners.svg" alt="Diners Club" />

    <img height="32" src="https://cashfreelogo.cashfree.com/assets_images/pg/card/svg/maestro.svg" alt="Maestro" />

    <img height="32" src="https://cashfreelogo.cashfree.com/assets_images/pg/card/svg/mastercard.svg" alt="Mastercard" />

    <img height="32" src="https://cashfreelogo.cashfree.com/assets_images/pg/card/svg/rupay.svg" alt="RuPay" />
  </div>
</Frame>

## Demo

You can view all available payment icons and explore the library's capabilities on the [demo page](https://cashfree.github.io/payments-icons-library/).

## Installation

Install the Payments icons library using npm:

```shell npm theme={"dark"}
npm i payments-icons-library
```

## Import the library

You can import the library using npm or include it directly in your HTML using a CDN.

<CodeGroup>
  ```javascript npm theme={"dark"}
  var Icons = require('payments-icons-library');
  ```

  ```javascript vanilla JS theme={"dark"}
  <script src="https://cdn.jsdelivr.net/gh/cashfree/payments-icons-library@latest/dist/image-library.js"></script>
  ```
</CodeGroup>

## Usage

The library provides methods to fetch individual icons, multiple icons, or all icons for a specific payment mode.

<CodeGroup>
  ```javascript ES6 theme={"dark"}
  import icons from "payments-icons-library";

  // Fetch a single icon
  let sbiIcon = icons.getIcon('sbi', 'sm');
  //{"icon_name": "sbi", "icon_url": "https://cashfreelogo.cashfree.com/assets_images/pg/nb/32/sbi.png", "icon_version": "1"}

  // Fetch multiple icons
  let [sbiIcon, auIcon] = icons.getIcons(['sbi', 'au'], 'sm');
  //[{"icon_name": "sbi", "icon_url": "https://cashfreelogo.cashfree.com/assets_images/pg/nb/32/sbi.png", "icon_version": "1"}, ...]

  // Fetch all icons for a payment mode
  let banksLogo = icons.getModesIcons('cardbanks', 'sm');
  //[{"icon_name": "sbi", "icon_url": "https://cashfreelogo.cashfree.com/assets_images/pg/nb/32/sbi.png", "icon_version": "1"}, ...]

  ```

  ```javascript Vanilla JS theme={"dark"}
  // Fetch a single icon
  let sbiIcon = paymentsIcons.getIcon('sbi', 'sm');
  //{"icon_name": "sbi", "icon_url": "https://cashfreelogo.cashfree.com/assets_images/pg/nb/32/sbi.png", "icon_version": "1"}

  // Fetch multiple icons
  let [sbiIcon, auIcon] = paymentsIcons.getIcons(['sbi', 'au'], 'sm');
  //[{"icon_name": "sbi", "icon_url": "https://cashfreelogo.cashfree.com/assets_images/pg/nb/32/sbi.png", "icon_version": "1"}, ...]

  // Fetch all icons for a payment mode
  let banksLogo = paymentsIcons.getModesIcons('cardbanks', 'sm');
  //[{"icon_name": "sbi", "icon_url": "https://cashfreelogo.cashfree.com/assets_images/pg/nb/32/sbi.png", "icon_version": "1"}, ...]

  ```
</CodeGroup>

<div class="hidden" data-table-of-contents="bottom">
  <p class="mt-4 font-medium flex items-center gap-2 related-docs-heading">
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="w-4 h-4">
      <path d="M3 4h7a2 2 0 0 1 2 2v13a2 2 0 0 0-2-2H3z" />

      <path d="M21 4h-7a2 2 0 0 0-2 2v13a2 2 0 0 1 2-2h7z" />
    </svg>

    <span>Related topics</span>
  </p>

  <ul>
    <li><a href="https://cashfree.github.io/payments-icons-library/" target="_blank">Payment Icons Demo</a></li>
    <li><a href="/docs/payments/online/element/introduction">Element Introduction</a></li>
    <li><a href="/docs/payments/online/web/redirect">Checkout Integration</a></li>
    <li><a href="/docs/payments/online/resources/payment-lifecycle">Payment Lifecycle</a></li>
    <li><a href="https://www.npmjs.com/package/payments-icons-library" target="_blank">NPM Package</a></li>
  </ul>
</div>
