Purchase a course category
Endpoint URL
POST /api/v2/categories/:id/purchase
Purchase a course category
Provided the category ID in the endpoint's path and the user ID in the request's body a category can be purchased for this specific user. Optionally, you can specify the redirection url if the purchase is cancelled or succeeded and you can also provide a coupon key.
Payments are processed either with the Stripe payment processor or with account credits.
Request
Responses
- 200
- 400
- 402
- 403
- 404
- 409
- 429
Purchase initiated
Invalid request body or coupon
Payment required or price changed
Insufficient permissions
Category or user not found
Unsupported payment processor or enrollment conflict
Coupon rate limit exceeded