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

# Wallets, Net Banking and BNPL Components

> Add Cashfree.js components for wallets, netbanking, BNPL, and UPI QR codes to your custom checkout to support diverse payment methods on a single page.

## wallet

A component to show a UPI qr code

<ResponseField name="wallet" type="Wallet Object">
  <Expandable title="properties">
    <ParamField body="provider" type="string" required>
      name of the wallet. ex `phonepe`. See [all wallet names in the appendix](/payments/online/element/appendix#wallet-providers).
    </ParamField>

    <ParamField body="buttonText" type="string">
      name of the wallet. ex `phonepe`.
    </ParamField>

    <ParamField body="buttonIcon" type="boolean">
      Decide whether to show app icon or not
    </ParamField>

    <ParamField body="phone" type="string">
      10 digit phone number of your customer
    </ParamField>
  </Expandable>
</ResponseField>

<h4>Returned Value</h4>
You can get the value of a component by calling `component.data().value`. All returned
values of `component.data()` can be found in the [components reference](/payments/online/element/components).

<ResponseField name="wallet" type="Wallet Object">
  <Expandable title="properties">
    <ResponseField name="provider" type="string">
      name of the wallet. ex `PhonePe`
    </ResponseField>

    <ResponseField name="phone" type="string" required>
      10 digit phone number of your customer
    </ResponseField>
  </Expandable>
</ResponseField>

<Accordion title="Code snippet for wallet component">
  ```javascript theme={"dark"}
  let cashfree = Cashfree({
    mode:"sandbox" //or production
  });
  let wallet = cashfree.create('wallet', {
  	values:{
  		provider: 'phonepe',
  		phone: '94140905',
  		buttonText: 'PhonePe',
  		buttonIcon: true
  	}
  });
  wallet.on('loaderror', function(data){
  	console.log(data.error)
  })
  wallet.mount("#mount-here");
  wallet.on('ready', function(d){
      console.log(wallet.data().value); //{provide: 'phonepe', phone: '94140905'}
      //or
      //console.log(d.value) 
  })
   
  ```
</Accordion>

## netbanking

A component to initiate Net Banking payment.

<Note>
  In case `buttonText` is not provided the value of `buttonIcon` would be
  replaced to `true`. This has been done so that your customer always sees icon
  of the app.
</Note>

<ResponseField name="netbanking" type="Wallet Object">
  <Expandable title="properties">
    <ParamField body="netbankingBankName" type="string" required>
      name of the bank. ex HDFC. See [all bank names in the appendix](/payments/online/element/appendix#netbanking-code-and-names).
    </ParamField>

    <ParamField body="buttonText" type="string">
      Text for button. ex `HDFC Bank`.
    </ParamField>

    <ParamField body="buttonIcon" type="boolean">
      Decide whether to show app icon or not
    </ParamField>
  </Expandable>
</ResponseField>

<h4>Returned Value</h4>
You can get the value of a component by calling `component.data().value`. All returned
values of `component.data()` can be found in the [components reference](/payments/online/element/components)

<ResponseField name="netbanking" type="Netbanking Object">
  <Expandable title="properties">
    <ResponseField name="netbankingBankName" type="string">
      name of the bank
    </ResponseField>
  </Expandable>
</ResponseField>

<Accordion title="Code snippet for wallet component">
  ```javascript theme={"dark"}
  let cashfree = Cashfree({
    mode:"sandbox" //or production
  });
  let netbanking = cashfree.create('netbanking', {
  	values:{
  		netbankingBankName: 'HDFCR',
  		buttonText: 'HDFC Bank',
  		buttonIcon: true
  	}
  });
  netbanking.on('loaderror', function(data){
  	console.log(data.error)
  })
  netbanking.mount("#mount-here");
  netbanking.on('ready', function(d){
      console.log(netbanking.data().value); //{netbankingBankName: 'HDFCR'}
      //or
      //console.log(d.value) 
  })
  ```
</Accordion>

## paylater

A component to initiate paylater payment.

<ResponseField name="paylater" type="Paylater Object">
  <Expandable title="properties">
    <ParamField body="provider" type="string" required>
      name of the wallet. ex simpl. See [all pay later provider names in the appendix](/payments/online/element/appendix#paylater-providers).
    </ParamField>

    <ParamField body="buttonText" type="string">
      Text for button, ex `Simpl`.
    </ParamField>

    <ParamField body="buttonIcon" type="boolean">
      Decide whether to show app icon or not
    </ParamField>

    <ParamField body="phone" type="string" required>
      10 digit phone number of your customer
    </ParamField>
  </Expandable>
</ResponseField>

<h4>Returned Value</h4>
You can get the value of a component by calling `component.data().value`. All returned
values of `component.data()` can be found in the [components reference](/payments/online/element/components)

<ResponseField name="paylater" type="Paylater Object">
  <Expandable title="properties">
    <ResponseField name="provider" type="string">
      name of the wallet
    </ResponseField>

    <ResponseField name="phone" type="string">
      10 digit phone number
    </ResponseField>
  </Expandable>
</ResponseField>

<Accordion title="Code snippet for paylater component">
  ```javascript theme={"dark"}
  let cashfree = Cashfree({
    mode:"sandbox" //or production
  });
  let p = cashfree.create('paylater', {
  	values:{
  		provider: 'simpl',
  		phone: '94140905',
  		buttonText: 'Use Simpl',
  		buttonIcon: true
  	}
  });
  p.on('loaderror', function(data){
  	console.log(data.error)
  })
  p.mount("#mount-here");
  p.on('ready', function(d){
      console.log(d.value) 
  })
  ```
</Accordion>

## cardlessEMI

A component to initiate Cardless EMI payment.

<ResponseField name="cardlessemi" type="Cardless EMI Object">
  <Expandable title="properties">
    <ParamField body="provider" type="string" required>
      name of the wallet. Example- flexmoney. See [all cardless EMI provider names in the appendix](/payments/online/element/appendix#cardless-emi-providers)
    </ParamField>

    <ParamField body="buttonText" type="string">
      Text for button, ex `Flexmoney`
    </ParamField>

    <ParamField body="buttonIcon" type="boolean">
      Decide whether to show app icon or not
    </ParamField>

    <ParamField body="phone" type="string" required>
      10 digit phone number of your customer
    </ParamField>
  </Expandable>
</ResponseField>

<h4>Returned Value</h4>
You can get the value of a component by calling `component.data().value`. All returned
values of `component.data()` can be found in the [components reference](/payments/online/element/components)

<ResponseField name="cardlessemi" type="Cardless EMI Object">
  <Expandable title="properties">
    <ResponseField name="provider" type="string">
      name of the provider
    </ResponseField>

    <ResponseField name="phone" type="string">
      10 digit phone number
    </ResponseField>
  </Expandable>
</ResponseField>

<Accordion title="Code snippet for paylater component">
  ```javascript theme={"dark"}
  let cashfree = Cashfree({
    mode:"sandbox" //or production
  });
  let cl = cashfree.create('cardlessEMI', {
  	values:{
  		provider: 'flexmoney',
  		phone: '94140905',
  		buttonText: 'Flexmoney',
  		buttonIcon: true
  	}
  });
  cl.on('loaderror', function(data){
  	console.log(data.error)
  })
  cl.mount("#mount-here");
  cl.on('ready', function(d){
      console.log(d.value) 
  })
  ```
</Accordion>

## savePaymentInstrument

A component that can be used in `.pay()` to save a payment method for a customer. This works for only cards. This will tokenize your card

<ResponseField name="savePaymentInstrument" type="Save Payment Instrument Object">
  <Expandable title="properties">
    <ParamField body="label" type="string">
      Label for the checkbox
    </ParamField>
  </Expandable>
</ResponseField>

<h4>Returned Value</h4>
You can get the value of a component by calling `component.data().value`. All returned
values of `component.data()` can be found in the [components reference](/payments/online/element/components)

<ResponseField name="savePaymentInstrument" type="Save Payment Instrument Object">
  <Expandable title="properties">
    <ResponseField name="saveInstrument" type="string">
      does the user wants to save
    </ResponseField>
  </Expandable>
</ResponseField>

<Accordion title="Code snippet for savePaymentInstrument component">
  ```javascript theme={"dark"}
  let saveOptions = {
  	values: {
  		label: "Save Card for later"
  	}
  };
  let savecard = cashfree.create("savePaymentInstrument", saveOptions);
  savecard.mount("#div-id");

  let cashfree = Cashfree();
  .....
  cashfree.pay({
  ...
  savePaymentInstrument: savecard
  })
  ```
</Accordion>

<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="/docs/payments/online/element/components">Element Components</a></li>
    <li><a href="/docs/payments/online/element/sdks">SDK Libraries</a></li>
    <li><a href="/docs/payments/online/element/cards">Card Components</a></li>
    <li><a href="/docs/payments/online/element/upi">UPI Components</a></li>
    <li><a href="/docs/payments/online/element/appendix">Payment Provider Codes</a></li>
  </ul>
</div>
