API Documentation
/License
License API
GET /api/license
Return the information about the license
header
Accept
:application/json
Authorization
:Bearer [access-token]
- Access token generated with [/oauth/token
].(token#post-oauthtoken)LicenseKey
:License key
- License key user receive in email when purchase a license.
body
Empty
response
Field subscription
will have different fields depending on the payment provider.
- status code
200
{
first_name: 'John',
last_name: 'Doe',
full_name: 'John doe',
email:'[email protected]',
plan_type: 'month',
plan_name: 'create-plan',
charge_type: 'subscription',
gateway: 'stripe',
active: true,
created_at: '02/25/2022 08:02:43',
subscribed: true,
cancelled: true,
subscription: {
stripe_id: 'sub_0KWylExCqoZozrbay9fnIzG3',
stripe_customer_id: 'cus_LDPaBKERK328kI',
ends_at_formated: 'March 25, 2022',
is_ended: false
}
}
PUT /api/license/cancel
Cancel user license.
header
Accept
:application/json
Authorization
:Bearer [access-token]
- Access token generated with [/oauth/token
].(token#post-oauthtoken)LicenseKey
:License key
- License key user receive in email when purchase a license.
body
Empty
response
when subscription is canceled
Field subscription
will have different fields depending on the payment provider.
- status code
200
{
success: true,
license: {
first_name: 'Ivan',
last_name: 'Đurđevac',
full_name: 'Ivan Đurđevac',
email: '[email protected]',
plan_type: 'month',
plan_name: 'create-plan',
charge_type: 'subscription',
gateway: 'stripe',
active: true,
created_at: '02/25/2022 16:23:10',
subscribed: true,
cancelled: true,
}
}
response
when there is no subscription
- status code
400
{
"message":"No such subscription: 'sub_xxx'",
"success":false
}