Subscription
Subscriptions allow you to offer recurring services or products to your users. This section provides detailed information on how to integrate and manage subscription plans within your application using our API.
Overview
Subscriptions enable you to create recurring billing models for your application. Users can subscribe to different plans with various billing intervals, such as monthly or yearly. This documentation will guide you through creating, managing, and canceling subscriptions.
Creating a Subscription Plan
To create a subscription plan, you'll need to define the pricing, billing cycle, and other relevant details. Below is a step-by-step guide on how to create a subscription plan.
Endpoint
POST /subscription-plans
Use this endpoint to create a new subscription plan.
Request
Response
Subscribing to a Plan Users can subscribe to a plan by providing their payment details and selecting the desired subscription plan.
Endpoint
POST /subscriptions
Use this endpoint to create a subscription for a user.
Request
Response
Managing Subscriptions
You may need to update or cancel subscriptions as needed. Below are examples of how to manage subscriptions.
Update Subscription
Endpoint
PUT /subscriptions/{subscription_id}
Use this endpoint to update an existing subscription.
Request
Response
Cancel Subscription
Endpoint
DELETE /subscriptions/{subscription_id}
Use this endpoint to cancel an existing subscription.
Response
Handling Payments
Ensure that you handle payment processing securely and comply with relevant regulations. Payments can be processed using various methods, including credit cards, digital wallets, or direct debits.
Webhooks
Set up webhooks to receive notifications about subscription events, such as renewals, cancellations, or failed payments. This helps you keep track of subscription status and take appropriate actions.
Example Webhook Event
Support If you have any questions or need assistance, please contact our support team at support.
Was this page helpful?
Helpful (0)
Not helpful (0)
© Copyright 2024. All rights reserved.