API Business Renewal
Step 1: Retrieving Business ID from the URL
When initiating a plan renewal, EasySocial appends a unique business ID to the plan renewal URL(provided by the partner). This ID is specific to each business and looks like this:
learn how to setup custom business renewal url.https://your-partner-url.com/renew?business_id=123456
OR
if you have saved the business id during the account setup process, you may use the same id to proceed to the next step. Learn how to get a business id.
Step2: Business Renew Auth API
This generates a new signature which is mandatory for the renewal process.
GET
https://partners-api.easysocial.in/:businessId/business-renew-auth
:businessId- This field needs to be updated with the business id.
Sample header payload
{
"token":"466d2e086a8f4f24bcb70789fee"
}
Step 3: Business Renew API
This API completes the renewal process by applying the new plan.
POST
https://partners-api.easysocial.in/:businessId/business-renew?signature=eyJtZXNzYWdlIjoiL2FwaS8zNzIvYnVzaW5lc3MtcmVuZXciLCJleHBpcnlEYXRlIjoiMjAyNC0wNS0zMVQxMzoxNDoyMS4wNzdaIn0.QkwOl2p0CKYyM7pPP8c0gGrxF-tP6quFilFzWqJmQU0
Sample body payload
{
"token":"466d2e086a8f4f24bcb70789fee",
"plan_slug":"7476",
"immediate_upgrade": true,
// mode is sandbox or live
"mode":"sandbox"
}
KEY PARAMETERS
1. Token: The "Partner API access token" to authenticate the request.
2. Plan Slug: A unique identifier for each plan. If not provided, a free plan will be automatically applied for 14 days.
3.Business Id- Business Id is a unique identifier given by EasySocial for each partner business.
4. Immediate Upgrade: If the user wants to upgrade their current plan immediately, this flag is set to true
.
5. Mode:
- Sandbox Mode: Used for testing. Any users created in this mode are temporary and will be removed within 72 hours.
- Live Mode: This is the production mode, where all users and changes are permanent.