Copy of Subscriptions
Augment your subscriptions with payments orchestration capabilities
Businesses that run on subscription model powered by providers viz. Chargebee, Recurly, Stripe Billing etc. can now augment it with payments orchestration by decoupling the payments from the subscription provider and using them purely for subscription ledger and scheduling, while owning 100% of the card vaulting, payment attempts, and retry logic (owned in-house, or via an ensemble of specialized payment-focused orchestrator and other focused third parties, modularized to work with each other)
Benefits
Greater control over payments with direct integrations and commercials with a range of Acquirers and Payment Processors
Improved reliability with a multi-PSP setup
Intelligent Routing capabilities to improve Authorization Rates and minimize Processing costs
Greater coverage of PMs, APMs and features offered by the PSPs
Centralised tokenisation of payment methods for PSP agnostic payments
How does it work?
Integrate your subscription provider as a billing processor on Juspay Hyperswitch
Create and maintain plans on the subscription provider's dashboard
During the checkout process use Hyperswitch for Payments
Hyperswitch completes the payment, securely tokenises and stores the card
Subscription is created at Hyperswitch and at the subscription provider's end
First invoice is marked as paid and the subscription is activated
Subsequent billing cycles are handled independently by Hyperswitch through MIT payments
Failed MIT payments can be smartly retried by Hyperswitch (read more) or by the solution provider of your choice.
Flow Diagram
Initial Subscription create flow (with CIT Payment)

MIT payment flow in subsequent billing cycle

Integration Guide
1. For non-PCI compliant merchants who wants to use Hyperswitch Payments SDK
Initial Subscription create flow (with CIT Payment)
Configure your Subscription Provider with Hyperswitch and set it as billing connector for the desired profile
Note: Dashboard support for this configuration will be available soon
Configure Hyperswitch Webhook endpoint for invoice events on the subscription provider's dashboard
Fetch the plan details (to be setup prior on subscription provider)
Display the retrieved Plan and Price Details to the user to make their selection
Once the user selects a particular Plan, create a customer on Hyperswitch (API Reference) and create a subscription with the following API
Initiate the Hyperswitch unified checkout SDK using the client_secret returned in the /subscriptions/create API response
When setting up subscription there are two distinct implementation flows.
The correct flow depends on whether you intend to charge the customer immediately or simply validate their details for later use.
1. The Setup with Charge Flow
Use Case: Use this when you need to collect a payment immediately (e.g., the first month of a subscription or a setup fee) while simultaneously saving the card details for future automatic charges.
Configuration Parameters :
setup_future_usage: "off_session"amount > 0
2. The Zero Dollar Authorization Flow
Use Case: Use this for free trials, pay-later models, or delayed billing. This flow validates the payment method details without charging the customer's card.
Configuration Parameters :
Pass below parameters while calling payments API for Zero Dollar Auth
setup_future_usage: "off_session"amount: 0payment_type: "setup_mandate"
Once the customer selects a payment method and enters the details and confirms the subscription, hit the /subscriptions/:id/confirm using a similar implementation as this
Sync with the subscription status for disbursement of services and future billing cycles
2. For PCI Compliant merchants handling the entire checkout experience
Follow the same steps as above to create a billing connector, fetch plan details and display the retrieved Plan and Price Details to the user to make their selection
Once the user selects a particular Plan, create a customer on Hyperswitch (API Reference), initiate checkout and collect payment method details
After the user enter card/PM details and confirms the payment, hit the Hyperswitch Subscriptions API
When setting up subscription there are two distinct implementation flows.
The correct flow depends on whether you intend to charge the customer immediately or simply validate their details for later use.
1. The Setup with Charge Flow
Use Case: Use this when you need to collect a payment immediately (e.g., the first month of a subscription or a setup fee) while simultaneously saving the card details for future automatic charges.
Configuration Parameters :
setup_future_usage: "off_session"amount > 0
2. The Zero Dollar Authorization Flow
Use Case: Use this for free trials, pay-later models, or delayed billing. This flow validates the payment method details without charging the customer's card.
Configuration Parameters :
Pass below parameters while calling payments API for Zero Dollar Auth
setup_future_usage: "off_session"amount: 0payment_type: "setup_mandate"
Response:
Sync with the status of the Subscription API to disburse services to subscribed users
Monitor incoming webhooks for renewal during subsequent cycles
Decoupled CIT and MIT Flow
Hyperswitch supports decoupled transaction flows, allowing Merchant-Initiated Transactions (MITs) to be processed independently of the original Customer-Initiated Transaction (CIT), even when the CIT was completed outside the Hyperswitch platform.
MITs are initiated by invoking the /payments API with off_session: true and providing the available reference data in the recurring_details object. Depending on the artifacts available in your system, one of the following approaches can be used:
Processor Payment Token : Submit a processor-issued token that represents the previously authorized payment instrument.
Network Transaction ID with Card Data : Provide the original network transaction identifier along with the associated primary card data required for authorization.
Network Transaction ID with Network Token : Submit the network transaction identifier in combination with the corresponding network tokenized card credentials.
Limited Card Data : Use a reduced card data set captured at the time of subscription creation to authorize subsequent MITs.
FAQs
1. What are subscriptions providers that are currently supported?
Currently we support Chargebee integration. In the upcoming roadmap we are planning to extend support for Recurly, Stripe Billing and Zuora
2. Can the entire experience from plan display, price estimation to payments be handled by Hyperswitch SDK?
We are planning to release a Hyperswitch Subscriptions SDK that will take care of the end-to-end experience.
Last updated
Was this helpful?

