Business Seeks Consent from Some Customers Only
Procedure to follow if you are not able to collect consent from all customers.
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.
Follow these steps:
- Log in to the .
- Navigate to Settings → Configuration.
- Enable the Collect Consent from Customers feature. This means that Razorpay is responsible for collecting the customer consent.
If you are collecting customer consent, ensure that you pass the following parameters in the Create Payment request:
<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: "Crime Master Gogo",});var data = {amount: 6666,currency: "INR",email: "gaurav.kumar@example.com",order_id: "order_ISsp1ekSCHgoAw",contact: 9123456780,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]: 'Gaurav Kumar'};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>
Handy Tips
You can convert a token BIN received in response to an actual BIN using
.If you are not collecting customer consent, ensure that you pass the following parameters in the Create Payment request:
<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: "Crime Master Gogo",});var data = {amount: 6666,currency: "INR",email: "gaurav.kumar@example.com",order_id: "order_ISsp1ekSCHgoAw",contact: 9123456780,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]: 'Gaurav Kumar'};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>
Handy Tips
You can convert a token BIN received in response to an actual BIN using
.Is this integration guide useful?
ON THIS PAGE