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 $299.35.

JSONObject data = new JSONObject();
data.put("amount", 29935);
data.put("currency", "");
data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders API
data.put("email", "john.smith@example.com");
data.put("contact", "+11234567890");
data.put("method", "card");
data.put("card[name]", "John Smith");
data.put("card[number]", "4916 3338 9663 2957");
data.put("card[expiry_month]", "12");
data.put("card[expiry_year]", "30");
data.put("card[cvv]", "100");

Is this integration guide useful?