For Card payments, method
should be specified as card
. Other required fields:
card[name]
card[number]
card[cvv]
card[expiry_month]
card[expiry_year]
The sample code shown below allows the checkout to accept a card payment of ₹299.35.
JSONObject data = new JSONObject();data.put("amount", 29935);data.put("currency", "INR");data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders APIdata.put("email", "gaurav.kumar@example.com");data.put("contact", "9000090000");data.put("method", "card");data.put("card[name]", "Gaurav Kumar");data.put("card[number]", "4111111111111111");data.put("card[expiry_month]", "12");data.put("card[expiry_year]", "30");data.put("card[cvv]", "100");
Check the
.If you want to securely store customer's card details as network tokens, know about
.