display configuration can be passed in the Checkout options.
You can use the display configuration to put together all the modules, that is, blocks, sequence, preferences, and hide instruments as shown below:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Display the configured payment methods on Razorpay Curlec Checkout.
display configuration can be passed in the Checkout options.
You can use the display configuration to put together all the modules, that is, blocks, sequence, preferences, and hide instruments as shown below:
let config = {
display: {
blocks: {
code: {
name: "The name of the block", // The title of the block
instruments: [instrument, instrument] // The list of instruments
},
anotherCode: {
name: "Another block",
instruments: [instrument]
}
},
hide: [
{
method: "method"
}
],
sequence: ["block.code"], // The sequence in which blocks and methods should be shown
preferences: {
show_default_blocks: true // Should Checkout show its default blocks?
}
}
};
// beginning of the Checkout code
.....
let options = {
key: "[YOUR_KEY_ID]",
amount: 60000,
currency: "MYR",
config: {
display: {
// The display config
}
}
};
let razorpay = new Razorpay(options);
razorpay.open();
....
//rest of the Checkout code
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]
-X POST https://api.razorpay.com/v1/orders
-H "content-type: application/json"
-d '{
"amount": 50000,
"currency": "MYR",
"receipt": "receipt#1",
"checkout_config_id": "config_Ep0eOCwdSfgkco"
}'
import razorpay
client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET"))
client.order.create({
"amount": 50000,
"currency": "MYR",
"receipt": "receipt#1",
"checkout_config_id": "config_Ep0eOCwdSfgkco"
})
$api = new Api($key_id, $secret);
$api->order->create(array('receipt' => 'receipt#1', 'amount' => 50000, 'currency' => 'MYR', 'checkout_config_id' => 'config_Ep0eOCwdSfgkco'));
RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");
Dictionary<string, object> options = new Dictionary<string,object>();
options.Add("amount", 50000); // amount in the smallest currency unit
options.Add("receipt", "receipt#1");
options.Add("currency", "MYR");
options.Add("checkout_config_id", "config_Ep0eOCwdSfgkco");
Order order = client.Order.Create(options);
var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })
instance.orders.create({
amount: 50000,
currency: "MYR",
receipt: "receipt#1",
checkout_config_id: "config_Ep0eOCwdSfgkco"
})
import ( razorpay "github.com/razorpay/razorpay-go" )
client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET")
data := map[string]interface{}{
"amount": 50000,
"currency": "MYR",
"receipt": "receipt#1",
"checkout_config_id": "config_Ep0eOCwdSfgkco"
}
body, err := client.Order.Create(data, nil)
require "razorpay"
Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')
order = Razorpay::Order.create amount: 50000, currency: 'MYR', receipt: 'receipt#1', checkout_config_id: 'config_Ep0eOCwdSfgkco'
RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");
JSONObject orderRequest = new JSONObject();
orderRequest.put("amount", 50000); // amount in the smallest currency unit
orderRequest.put("currency", "MYR");
orderRequest.put("receipt", "receipt#1");
orderRequest.put("checkout_config_id", "config_Ep0eOCwdSfgkco");
Order order = razorpay.orders.create(orderRequest);
{
"id": "order_EKwxwAgItmmXdp",
"entity": "order",
"amount": 50000,
"amount_paid": 0,
"amount_due": 50000,
"currency": "MYR",
"receipt": "receipt#1",
"offer_id": null,
"status": "created",
"attempts": 0,
"notes": [],
"created_at": 1582628071
}