> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-881012b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Business Seeks Consent from Some Customers Only

> Procedure to follow if you are not able to collect consent from all customers.

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
</div>

If you can collect consent from a few of your users (possibly, new app versions) but unable to collect consent for the rest of your users (possibly, on old app versions), follow the steps below.

## 1. On Dashboard

Follow these steps:

1. Log in to the Dashboard.
2. Navigate to **Settings** → **Configuration**.
3. Enable the **Collect Consent from Customers** feature. This means that Razorpay is responsible for collecting the customer consent.

## 2. In Integration Code

#### Business Collecting Customer Consent

If you are collecting customer consent, ensure that you pass the following parameters in the **Create Payment** request:

```javascript Custom Checkout theme={null}
<script src="https://checkout.razorpay.com/v1/razorpay.js"></script>
  <button id="rzp-button1" style="background-color: #3399cc; color: white; font-size: 16px; font-family: sans-serif">Pay</button>
  <script>
       var razorpay = new Razorpay({
        key: "<YOUR_KEY_ID>",
        image: "https://i.imgur.com/n5tjHFD.jpg",
        name: "<name>",
       });
       var data = {
        amount: 6666,
        currency: "INR",
        email: "<email>",
        order_id: "order_ISsp1ekSCHgoAw",
        contact: <phone>,
        notes: {
          address: "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru",
        },
        customer_id: "cust_1Aa00000000001",
        save: 1,
        consent_to_save_card: 1,
        method: "card",
        card[number]: '4242424242424242',
        card[expiry_month]: '11',
        card[expiry_year]: '23',
        card[cvv]: '123',
        card[name]: '<name>'
       };

       document.getElementById("rzp-button1").onclick = function(){
        razorpay.createPayment(data);
        razorpay.on("payment.success", function(resp) {
          alert(resp.razorpay_payment_id)
          });
        razorpay.on("payment.error", function(resp){alert(resp.error.description)});
}
</script>
```

<Info>
  **Handy Tips**

  You can convert a token BIN received in response to an **actual BIN** using [token APIs](/docs/payments/payment-methods/cards/token-hq/razorpay-requestor/apis).
</Info>

#### Business Not Collecting Customer Consent

If you are not collecting customer consent, ensure that you pass the following parameters in the **Create Payment** request:

```javascript Custom Checkout theme={null}
<script src="https://checkout.razorpay.com/v1/razorpay.js"></script>
  <button id="rzp-button1" style="background-color: #3399cc; color: white; font-size: 16px; font-family: sans-serif">Pay</button>
  <script>
       var razorpay = new Razorpay({
        key: "<YOUR_KEY_ID>",
        image: "https://i.imgur.com/n5tjHFD.jpg",
        name: "<name>",
       });
       var data = {
        amount: 6666,
        currency: "INR",
        email: "<email>",
        order_id: "order_ISsp1ekSCHgoAw",
        contact: <contact>,
        notes: {
          address: "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru",
        },
        customer_id: "cust_1Aa00000000001",
        save: 1,
        method: "card",
        card[number]: '4242424242424242',
        card[expiry_month]: '11',
        card[expiry_year]: '23',
        card[cvv]: '123',
        card[name]: '<name>'
       };

       document.getElementById("rzp-button1").onclick = function(){
        razorpay.createPayment(data);
        razorpay.on("payment.success", function(resp) {
          alert(resp.razorpay_payment_id)
          });
        razorpay.on("payment.error", function(resp){alert(resp.error.description)});
}
</script>
```

<Info>
  **Handy Tips**

  You can convert a token BIN received in response to an **actual BIN** using [token APIs](/docs/payments/payment-methods/cards/token-hq/razorpay-requestor/apis).
</Info>
