Purchase a course
Endpoint URL
POST /api/v2/courses/:id/purchase
Purchase a course
Provided the course ID in the endpoint's path and the user ID in the request's body a course 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
Course or user not found
Unsupported payment processor or inactive user
Coupon rate limit exceeded