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: 'permissions_denied' }
{ "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:
|
Only registered user can perform this action Authentication - string - required Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"
{ "proration_amount": 89999, "with_coupon": false }
{ permissions: ['denied'], message: 'permissions_denied' }
{ "message": "subscription not found" }
Code | Description |
---|---|
unauthorized | |
forbidden | |
not_found |
Param name | Description |
---|---|
plan_id
required |
ID of plan Validations:
|