Payment Methods
Integrate different payment methods in Razorpay Android Custom SDK Checkout.
The Razorpay Android Custom SDK lets you integrate the supported payment methods on your Android app's Checkout form.
Use the
to fetch the payment methods available for your account.Below are the sample payloads for each payment method.
There are no specific request parameters to be passed. Instead, you must pass the fetchVirtualAccount
method for your Customer Identifier to get created and the details to appear on the checkout. Know more about
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 RM 299.35.
JSONObject data = new JSONObject();data.put("amount", 29935);data.put("currency", "MYR");data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders APIdata.put("email", "siti.aisyah@example.com");data.put("contact", "+6026901126");data.put("method", "card");data.put("card[name]", "Siti Aisyah");data.put("card[number]", "4842793002086571");data.put("card[expiry_month]", "12");data.put("card[expiry_year]", "30");data.put("card[cvv]", "100");
For Wallet payments, method
should be specified as wallet
.
The sample code shown below allows the checkout to perform a wallet transaction for a payment of RM 299.35 :
JSONObject data = new JSONObject();data.put("amount", 29935);data.put("currency", "MYR");data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders APIdata.put("email", "siti.aisyah@example.com");data.put("contact", "+6026901126");data.put("method", "wallet");data.put("wallet", "grabpay");
Check the list
.Is this integration guide useful?
ON THIS PAGE