Only registered user can perform this action
Authentication - string - required
Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"
{
"subscription": {
"plan_id": 1,
"token": "sk_JfsH5ur87",
"coupon_id": 3
}
}
{
"success": true
}
{
permissions: ['denied'],
message: 'You don’t have access to perform this action.'
}
{
"message": "MESSAGE"
}
| Code | Description |
|---|---|
| unauthorized | |
| forbidden | |
| unprocessable_entity |
| Param name | Description |
|---|---|
|
subscription
required |
Validations:
|
|
subscription[plan_id]
required |
ID of plan Validations:
|
|
subscription[token]
required |
Stripe token Validations:
|
|
subscription[coupon_id]
optional |
Coupon Validations:
|