Skip to main content
Available in🇮🇳 India
Pay Later lets your customers buy now and pay the provider later, using a credit line the provider has approved for them. The customer confirms the payment on the provider’s page. You receive the full amount in your settlement, and the customer repays the provider separately. This page describes how to accept Pay Later payments using the S2S JSON API. Pay Later uses method=paylater together with a provider code.
Handy TipsContact our Support team to enable Pay Later and the providers you want for your account. Customers must have an account with the provider they choose.

Integration Steps

Follow these steps to integrate the S2S JSON API and accept payments using Pay Later: 1.1 Fetch the List of Pay Later Providers. 1.2 Create an Order. 1.3 Create a Payment. 1.4 Handle Payment Success and Error Events. 1.5 Fetch Payment Details and Status. 1.6 Verify Payment Signature. 1.7 Integrate Payments Rainy Day Kit. 1.8 Verify Payment Status.

1.1 Fetch the List of Pay Later Providers

Fetch the Pay Later providers enabled on your account and their codes. You pass the provider code in the provider field when you create a payment. The response contains only the providers enabled for your account. A provider that is not enabled for you does not appear in the paylater object. Pass your key id as the key_id query parameter. Do not send the key secret to this endpoint. GET /v1/methods

Supported providers

The provider approves each payment against the customer’s available credit limit. Check eligibility before checkout (optional). To show only the providers a customer is eligible for, call the Eligibility Check API (POST /v1/customers/eligibility) before you display Pay Later options. Know more about the Eligibility Check API.

1.2 Create an Order

Create an order for every payment. The order ties the payment to the purchase in your system and protects the request from tampering. Create the order from your server using the Orders API. POST /v1/orders

Request Parameters

integer
required
Payment amount in the smallest currency sub-unit. For example, for ₹3,000, enter 300000.
string
required
The currency in which the transaction should be made. Pay Later supports INR only.
string
Your receipt number for the order. Maximum length is 40 characters.
json object
Key-value pairs for additional information. Maximum 15 pairs, 256 characters each. For example, "note_key": "Beam me up Scotty".

1.3 Create a Payment

After you create the order, create a payment with paylater as the method and the provider code from step 1.1. POST /v1/payments/create/json

Request Parameters

integer
required
Payment amount in the smallest currency sub-unit. Must match the order amount. For example, for ₹3,000, enter 300000.
string
required
The currency of the payment. Use INR.
string
required
The unique identifier of the order created in step 1.2.
string
required
Customer’s email address.
string
required
Customer’s mobile number. Use an Indian mobile number. Pay Later providers identify the customer by this number.
string
required
The payment method. Use paylater.
string
required
Code of the Pay Later provider. Possible values:
  • lazypay: LazyPay
  • amazonpay: Amazon Pay Later
The provider must be enabled on your account. Check the paylater object in step 1.1.
string
URL on your server where Razorpay sends a POST request with the payment result after the customer completes or abandons the payment on the provider page. Pass this URL to receive the success and failure callbacks in step 1.4.
string
IP address of the customer’s device.
string
URL of the page from which the customer started the payment.
string
User agent of the customer’s browser.
json object
Key-value pairs for additional information. Maximum 15 pairs, 256 characters each.

Response Parameters

If the payment request is valid, the response contains these fields:
string
Unique identifier of the payment. Store it to fetch the payment status later.
array
A list of actions you can take to continue the payment.
Redirect the customer to the url of the redirect action. The customer confirms the payment on the provider page, for example, by entering the OTP the provider sends. After that, Razorpay sends the customer back to your callback_url.

1.4 Handle Payment Success and Error Events

After the customer completes or cancels the payment, Razorpay sends a POST request (form-encoded) to the callback_url you passed in the payment request. The fields depend on whether the payment succeeded or failed.

Success Callback

If the payment is successful, the callback contains these fields:
  • razorpay_payment_id
  • razorpay_order_id
  • razorpay_signature
Callback Example
Verify the signature before you treat the payment as successful. See step 1.6.

Failure Callback

If the payment fails, the callback contains an error object. For example, this callback is sent when the customer cancels the payment on the provider page:
Callback Example
The callback is a form-encoded POST; the example above shows its fields as JSON. Common reasons a Pay Later payment fails:
  • The customer cancelled the payment on the provider page.
  • The customer is not registered with or not eligible for the provider.
  • The customer’s available credit limit is lower than the amount.
  • The customer exceeded the OTP attempts on the provider page.
  • The provider declined the payment, or the customer did not complete it in time.
Show the customer the error description and let them retry with another payment method. Refer to Errors for the full list of error codes and reasons.

1.5 Fetch Payment Details and Status

Use the razorpay_payment_id from the callback to fetch the payment and check its status. GET /v1/payments/:id
Handy TipsFor Pay Later payments, the payment entity returns the provider code in the wallet field. For example, "wallet": "lazypay".

1.6 Verify Payment Signature

Signature verification is mandatory. It confirms that the callback came from Razorpay. Build a string from the order_id you created in step 1.2 and the razorpay_payment_id from the callback, separated by |. Generate an HMAC-SHA256 hex digest of this string using your key secret. Compare it with razorpay_signature.
Pseudocode
Use the order_id stored on your server, not the razorpay_order_id from the callback.

1.7 Integrate Payments Rainy Day Kit

Use the Payments Rainy Day Kit to handle payment exceptions such as:

1.8 Verify Payment Status

Handy TipsEnsure the payment status is captured. A payment in authorized status is not settled to you until it is captured. Know how to capture payments automatically.
To verify the payment status from the Razorpay Dashboard:
  1. Log in to the Razorpay Dashboard and go to Transactions → Payments.
  2. Check that a payment id has been generated and note its status. A successful payment shows Captured.

Next Steps

Step 2: Test Integration
Last modified on November 17, 2026