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

# Wallets, Net banking and BNPL components

> Learn to create components for Wallets, Net banking and BNPL.

## 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`. All names [here]().
    </ParamField>

    <ParamField body="buttonText" type="string">
      name of the wallet. ex `phonepe`. All names [here]().
    </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 [here](/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={null}
  let cashfree = Telr({
    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. All names [here]().
    </ParamField>

    <ParamField body="buttonText" type="string">
      Text for button. ex `phonepe`. All names [here]().
    </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 [here](/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={null}
  let cashfree = Telr({
    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. All names [here]().
    </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 [here](/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={null}
  let cashfree = Telr({
    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. ex flexmoney
    </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 [here](/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={null}
  let cashfree = Telr({
    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 [here](/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={null}
  let saveOptions = {
  	values: {
  		label: "Save Card for later"
  	}
  };
  let savecard = cashfree.create("savePaymentInstrument", saveOptions);
  savecard.mount("#div-id");

  let cashfree = Telr();
  .....
  cashfree.pay({
  ...
  savePaymentInstrument: savecard
  })

  ```
</Accordion>

```
```
