Skip to main content
Available in🇮🇳 India

What UPI Collect Is

In the UPI Collect flow, the customer enters their Virtual Payment Address (VPA) on your UI. Razorpay sends a collect request to that VPA. The customer approves the request in their UPI app with their UPI PIN, and you receive the payment status.
UPI Collect Flow DeprecatedAccording to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers.Exemptions: UPI Collect will continue to be supported for:
  • MCC 6012 & 6211 (IPO and secondary market transactions).
  • iOS mobile app and mobile web transactions.
  • UPI Mandates (execute/modify/revoke operations only)
  • eRupi vouchers.
  • PACB businesses (cross-border/international payments).
Action Required:
  • If you are a new Razorpay user, use UPI Intent.
  • If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the migration documentation.
NPCI Restrictions for UPI Collect FlowAs per NPCI guidelines, the following MCC codes are restricted and cannot accept UPI Collect payments:

Best Practices

Follow these best practices to accept online payments using the UPI Collect flow:
  • Validate the VPA before you initiate the payment. Show the customer name returned by the API and let the customer confirm it before you send the collect request.
  • Set upi.expiry_time based on your business needs so that the customer has enough time to approve the request.
  • Tell the customer to open their UPI app to approve the request, and show a timer until the request expires.
  • Use Saved VPA that repeat customers do not have to enter their VPA again.

Prerequisites

  • Reach out to our Support Team to enable UPI Collect and VPA validation for your account. Ask for the saved VPA feature too if you plan to use Saved VPA.
  • Generate API keys in the Dashboard. Use test keys (rzp_test_) while you build, and live keys (rzp_live_) after you go live. Keep the key secret on your server only.
    • Partner auth is different from merchant auth. If you are a partner calling the APIs on behalf of a business you onboarded, do not use API keys or Basic Auth. Use the business’s OAuth access token instead. Know more about generating an access token.
      • The access token expires every 90 days. Use the refresh token to get a new one before it expires. Know more about tokens.
      • Verify payment signatures with your OAuth application’s client_secret, not an API key secret. Verify webhooks with the secret you set on the application. Know more about partner signature verification.
  • If you are an international business looking to collect payments from Indian customers, refer to our import payment flow documentation.
  • Authenticate every API call with Basic Auth if you use API keys. Use your Key Id as the username and your Key Secret as the password. Know how to authenticate.

User Flow

  1. The customer selects UPI as the payment method and enters their VPA on your UI.
  2. You validate the VPA and show the name linked to it. The customer confirms the name.
  3. You initiate the payment. Razorpay sends a collect request to the customer’s VPA.
  4. The customer opens their UPI app, approves the request and enters their UPI PIN.
  5. You receive the payment status through webhooks or by polling the payment.

Integration Steps

  1. Create an order.
  2. Validate the VPA entered by the customer.
  3. Initiate a payment with a collect request on the validated VPA.
  4. Handle payment success and error events.
  5. Verify the payment status.

Step 1: Create an Order

You should create an order before initiating a payment at your end. POST /orders
Response

Request Parameters

integer
required
The amount for which the order was created, in currency subunits. For example, for an amount of ₹295, enter 29500.
string
required
ISO code for the currency in which you want to accept the payment. Only INR is supported.
string
Receipt number that corresponds to this order, set for your internal reference. Maximum length of 40 characters.
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: Validate the VPA

Before you send a collect request, check that the customer’s VPA exists and is active. This avoids collect requests that are sure to fail. Collect the VPA details of the customer and validate it as follows: POST /payments/validate/vpa
Response

Request Parameters

string
required
The virtual payment address (VPA) you want to validate. For example, gauravkumar@exampleupi.

Response Parameters

string
The VPA sent in the request. For example, gauravkumar@exampleupi.
boolean
Indicates whether the VPA exists. Possible values:
  • true: The VPA exists. Proceed to initiate the payment.
  • false: The VPA does not exist. Ask the customer to enter the VPA again.
string
The name linked to the VPA. For example, Gaurav Kumar. Returned only when success is true.

Error Responses

When the API cannot check the VPA, it returns an error object instead.
Error Response
Handy Tips
  • A response with success as false is still an HTTP 200 response. Decide the next step using the success field, not the HTTP status.
  • VPAs with the @paytm handle and VPAs of banks that are not recognised return 200 with success as false. Treat this as an invalid VPA.
  • Check the VPA format on your page before you call the API, for example with the pattern /^[a-z0-9.-]{2,}@[a-z0-9]+$/i. Validate when the customer leaves the field, not on every keystroke.
  • Do not store a validated VPA and skip the check later. A VPA can be deactivated, so validate it on every checkout.
  • You cannot validate a VPA in Test Mode.

Step 3: Initiate a Payment

After the VPA is validated, create a payment with the vpa the customer confirmed. Razorpay sends a collect request to this VPA. POST /payments/create/upi

Request Parameters

integer
required
The amount associated with the payment in the smallest unit of the supported currency. For example, 2000 means ₹20.
string
required
ISO code of the currency associated with the payment amount. Only INR is supported.
string
required
Unique identifier of the order obtained in the response of the previous step.
object
Key-value pairs that can hold additional information about the payment.
Refer to the Notes section of the API Reference Guide.
string
Descriptive text of the payment.
string
required
Phone number of the customer.
string
required
Email address of the customer.
Watch Out!The email field is mandatory by default. However, you can contact the support team to make it optional using a feature flag.
string
required
The client’s browser IP address. For example, 117.217.74.98.
string
required
Value of referer header passed by the client’s browser. For example, https://example.com/
string
required
Value of user_agent header passed by the client’s browser.
For example, Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
object
required
Details of the UPI payment.
string
required
Specify the type of the UPI payment flow.
Possible values are:
  • collect (default)
  • intent
string
required
The customer’s VPA to which the collect request will be sent.
integer
required
The number of minutes after which the link will expire. The default value is 5. Maximum value is 5760.

Response Parameters

razorpay_payment_id : string Unique identifier for the payment returned by Checkout only for successful payments.

Step 4: Handle Payment Success and Error Events

Once the customer completes the payment, a POST request is made to the callback_url provided in the payment request. The data contained in this request will depend on whether the payment was a success or a failure.

Success Callback

If the payment made by the customer is successful, the following fields are sent:
  • razorpay_payment_id
  • razorpay_order_id
  • razorpay_signature
Callback Example

Failure Callback

If the payment has failed, the callback will contain details of the error. Refer to Errors for details.

Step 5: 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:

Test the Integration

Once you’ve completed the integration, test it using our test cases for UPI Collect.

Payment failure and re-initiating payment

If the Order is not marked paid within 2-3 minutes, then you can re-initiate payment for the same.

Saved VPA

Customers often mistype their VPA or forget it, which leads to drop-offs. With Saved VPA, Razorpay saves a customer’s VPA as a token after a successful payment. On a repeat visit, the customer picks the saved VPA instead of typing it again. Saved VPA is not available in Test Mode yet. Test Mode support is coming soon. The customer experience works like this:
  1. The customer enters their VPA on your UI and completes a UPI Collect payment.
  2. Razorpay saves the VPA as a token for that customer.
  3. On a repeat visit, you show the customer’s saved VPAs on your UI.
  4. The customer selects a saved VPA and completes the payment.
To use Saved VPA:
  1. Create a customer or fetch the existing customer.
  2. Save the VPA during the customer’s first payment.
  3. On a repeat visit, fetch the saved VPAs of the customer.
  4. Initiate a payment using the saved VPA the customer selects.

Create a Customer

Handy TipsSkip this step if you already have customers created in your account.
Create a customer whose VPAs should be saved, with details such as email and contact. POST /customers
Response

Request Parameters

string
required
The name of the customer.
string
The email id of the customer.
string
The phone number of the customer.
string
The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter fail_existing to get the existing customer’s details in the response. Possible values:
  • 1 (default): If a customer with the same details already exists, throws an error.
  • 0: If a customer with the same details already exists, fetches details of the existing customer.
object
Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.

Save the VPA

Follow the integration steps above. In Step 3: Initiate a Payment, also pass the customer_id and save parameters. Razorpay saves the VPA as a token when the payment succeeds.
Curl
string
required
Unique identifier of the customer, obtained when you create a customer.
boolean
required
Specifies if the VPA should be saved as a token. Possible values:
  • true: Saves the VPA.
  • false (default): Does not save the VPA.

Fetch the Saved VPAs of a Customer

On a repeat visit, fetch the tokens saved for the customer and show the VPAs on your UI. The response also includes saved cards, if any. Show only the tokens where method is upi. GET /customers/:customer_id/tokens

Initiate a Payment Using a Saved VPA

Create an order first. Then, in the payment request, pass the customer_id and token of the VPA the customer selected instead of upi.vpa: POST /payments/create/upi

Request Parameters

string
Unique identifier of the customer.
string
Token of the saved VPA.

Response Parameters

Once the payment is successfully created, you will receive a response containing the next array. This array tells you the next steps that you should take to process the payment: razorpay_payment_id : string Unique identifier for the payment returned by Checkout only for successful payments. next : array A list of action objects available to you to continue the payment process. Present when the payment requires further processing. action : string The action that you need to perform further. In this case, the value is poll url : string Contains the URL that you must poll to fetch the status of the payment, either authorized or failed. After you initiate the payment, handle the payment events and verify the payment status as in the main flow.

Next Steps

Proceed to testing your UPI Collect integration.
Last modified on December 2, 2026