Create a subscription link
A subscription link is a hosted checkout page that Razorpay generates for a given plan. You can share theshortUrl directly or embed it in emails and dashboards.
Add-ons to include at creation. Each add-on needs an
item (either { id: "item_XXX" } or a new item with name, amount, currency, and optional description) and an optional quantity.Subscription links are created directly on Razorpay and do not require an existing customer. When the customer completes checkout, Razorpay creates the subscription and sends webhook events.
Link and delete offers
Apply an existing Razorpay offer to a subscription, or remove it.Link an offer
Delete an offer
Pending updates
When you schedule a subscription change for the next cycle, Razorpay creates a pending update. You can fetch or cancel it before it applies.Fetch pending update
Cancel pending update
Canceling a pending update keeps the subscription on its current plan and quantity. The change scheduled for the next cycle is discarded.
Subscription add-ons
Attach extra chargeable items to an existing subscription. Add-ons appear on future invoices.Create a subscription add-on
Either
{ id: "item_XXX" } or a new item with name, amount, currency, and optional description.Fetch invoices for a subscription
List all invoices generated for a Razorpay subscription.Fetch a Razorpay subscription
Retrieve the current state of a subscription directly from Razorpay.List all Razorpay subscriptions
Query subscriptions across your Razorpay account with filters and pagination.Filter by status:
created, authenticated, active, pending, halted, paused, cancelled, reverted, expired, or completed.React hooks
Use the TanStack Query hooks for links, offers, pending updates, add-ons, invoices, and subscription lookups.app/subscription/manage/page.tsx