Best Practices
If you have a significant amount of payment traffic coming from the Mobile Site, then it is advisable to use the Google Pay Intent flow available for the mSite:- Do not change Intent URL
- Host UPI apps
Prerequisites
- Reach out to our Support Team to get this feature enabled for your account.
- Keep the API keys (
Key_IdandKey_Secret) handy for integration. - Generate API Keys from the Dashboard if you have not done already.
Integration Steps
1
[Create an order](#step-1-create-an-order).
2
[Initiate Payment using the intent URL](#step-2-initiate-a-payment).
3
[Verify the payment status](#step-3-verify-the-payment-status).
Step 1: Create an Order
You should create an order before initiating a payment at your end. /ordersRequest
Request Parameters
amount mandatory
: integer The amount for which the Order was created, in currency subunits. For example, for an amount of ₹295, enter 29500.
currency mandatory
: string ISO code of the currency associated with the payment amount. Only INR is supported.
receipt optional
: string Receipt number that corresponds to this order, set for your internal reference. Maximum length of 40 characters supported.
notes optional
: json object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
Step 2: Initiate a Payment
After creating an order, initiate a payment withintent flow.
/payments/create/upi
Request
Step 3: Verify the Payment Status
You can verify the status of the payments using any of the following methods:- Poll Razorpay servers periodically for the payments made for the order using our Fetch Payment APIs.
- Subscribe to the Webhook events created in our system for each of the following entities:
Payment failure and re-initiating payment
If the Order is not markedpaid within 2-3 minutes, then you can re-initiate payment for the same.