How to integrate Razorpay with SleepPRO™

Payment gateways

Here is how to connect Razorpay, a payment provider in India.

You will need a Razorpay account.

1. Connect Razorpay

  1. Click your profile picture, then Settings.
  2. Click Payment gateways, then Connect next to Razorpay.
  3. Enter your Razorpay credentials and click Save.

2. Get your API key ID and secret

  1. Log in to Razorpay and go to Settings, then Websites & API Keys.
  2. Generate and copy your API key ID and secret.

You can also go straight to dashboard.razorpay.com/app/keys.

3. Set up webhooks

  1. Copy the webhook URL and secret from the Razorpay section in SleepPRO™.
  2. In Razorpay, go to Settings, then Webhooks, and click Add new webhook.
  3. Paste the webhook URL and secret.
  4. Tick these events:
  • Payment: payment.authorized, payment.failed, payment.captured.
  • Order: order.paid.
  • Invoice: invoice.paid, invoice.expired.
  • Subscription: subscription.authenticated, subscription.paused, subscription.resumed, subscription.activated, subscription.pending, subscription.halted, subscription.charged, subscription.cancelled, subscription.completed, subscription.updated.
  • Refund: refund.processed, refund.created.
ScreenshotRazorpay webhook events
Tick every event above. Without them, SleepPRO™ cannot record payments and subscriptions, and customers do not get access to what they bought.
Your order form needs the Email, First name, Last name and Phone number fields, or Razorpay payments cannot go through.

4. Currencies and restrictions

  • Buyers: India.
  • Subscriptions: yes, in INR only.
  • One-time payment currencies: INR, LKR, PEN and VND.
  • Your Razorpay account must be registered in India.

When a payment fails

After the first attempt, Razorpay tries three more times, one day apart. You cannot change this delay. You can retry sooner yourself from your Razorpay dashboard, but this does not add extra attempts.

Still stuck? We are here for you.

SleepPRO™ support is available 24/7 and usually replies within 12 hours, often sooner.

Send us an email