Implement Hyperline for a self-serve product
In this guide, we will see how to implement Hyperline subscription in the context of a self-served product.
Context
You have a pricing page on your marketing website and want your customer to subscribe when clicking on an offer.
Prerequisites
- Create an Hyperline account
- Follow the steps to configure your account
- A clear idea of the plans you want to sell and their associated prices
- An API key to use the Hyperline API
When signed up and landed on Hyperline, you can use the Test mode to experiment before going live.
Steps
1. Model your products and plans in Hyperline
The first thing you need to do is to create your products and (optionally) plans in Hyperline.
You’ll need to do this operation once, but you can easily iterate on your pricing to experiment and adjust later.
If you need any assistance in representing the best way your offer or need advise, you can contact the support using the ‘Help’ chat.
2. Implement a subscription flow
Below is a suggested example of the flow to initiate a prospect’s subscription to your product. Of course, this may vary based on your specific use case and product and can be adjusted to suit your requirements.
The prospect create an account
For this example, the prospect initially signs up for your product by creating an account on your side.
Create a Hyperline customer
When the prospect signed up, your backend create a customer on Hyperline related to the newly signed up customer on your system.
Assign a subscription
Then you can assign a subscription from the plan selected by the customer.
You need to use the ID corresponding to plans previously created, which can be found in Hyperline plans page (next to the plan name).
This example will create a dedicate checkout page for your customer to fill in their billing details, add their payment method and subscribe. We’ll start the subscription from the current date and redirect back the customer to a specific URL (https://acme.com/api/callback) on your side after completing the checkout.
If your want to customize the quantity of products, you can use an additional parameter in the request body.
Redirect to the subscription checkout
After creating the subscription, you’ll receive a checkout URL in the response payload.
Redirect your customer to this URL for them to subscribe.
Handling subscription
When completed, the customer will be redirected to the final URL on your side (previously configured when creating the subscription). The customer is now successfully subscribed to your service.
You have the option to store this information on your end or entirely rely on Hyperline and retrieve the subscription status for the customer at any time.
If you want to retrieve the quantity of the subscription products or the full details, you can use the subscriptions API.
That’s it! You can then proceed with your desired product flow.
Your customer will be automatically invoiced and their payment method charged according to the configuration of the created subscription.
3. Follow the subscription
You’re able to retrieve at any time a unique portal link for your customer to follow their subscription, edit their payment method, or download their invoices.
We recommend adding a button in your product redirecting to this page for your customer to “manage billing”.
You can also follow and manage your customers’ subscriptions on Hyperline.
Was this page helpful?