A simple WooCommerce plugin that allows merchants to create a Razorpay payment button on any page using a shortcode.
- Easy Razorpay integration
- Add payment button using shortcode
[RZP] - Custom payment details via custom fields
- No complex WooCommerce setup required for quick payments
- Download the plugin
.zipfile - Go to WordPress Admin → Plugins → Add New
- Click Upload Plugin
- Upload the
.zipfile and click Install Now - Click Activate
- After activation, navigate to plugin settings
- Enter the following Razorpay credentials:
- Key ID
- Key Secret
- Click Save Changes
You can get these credentials from your Razorpay Dashboard.
- Go to Pages → Add New (or edit an existing page)
- Add a block and insert the shortcode:
[RZP]
- This will render the Razorpay payment button on the frontend
- Click the top-right menu (⋮) in the page editor
- Go to Preferences → Panels
- Enable Custom Fields
- Save preferences and refresh the page
Scroll down to the Custom Fields (Meta Boxes) section and add the following fields:
| Field Name | Required | Description |
|---|---|---|
| name | Yes | Name of the product/service |
| description | Yes | Short description |
| amount | Yes | Payment amount (in smallest currency unit, e.g., paise) |
Field names must match exactly:
name,description,amount
- Click Publish or Update
- Open the page on the frontend
- Click the Razorpay button
- Payment popup will appear with the configured amount
Custom Fields:
name: Test Product description: Test payment amount: 50000
This will create a payment of ₹500.00
- Ensure Razorpay credentials are correct
- Amount should be passed in the smallest currency unit (paise)
- Custom field labels are case-sensitive
Payment button not visible?
- Ensure
[RZP]shortcode is added correctly - Verify plugin is activated
Custom fields not showing?
- Enable them via Preferences → Panels → Custom Fields
- Refresh the editor
Payment not working?
- Check Razorpay API keys
- Verify browser console for errors