POST
/v1/checkout
curl \
--request POST 'https://classmanager.test/v1/checkout' \
--header "Content-Type: application/json" \
--data '{"basketId":"bskt_xxx"}'
Request examples
{
"basketId": "bskt_xxx"
}
Response examples (200)
{
"checkout": {
"enrolments": [
{
"basketItem": {
"studentId": "stu_xxx",
"courseId": "cls_xxx"
},
"price": {
"netPrice": 1000,
"discountAmount": -200,
"taxAmount": 200,
"grossPrice": 1000
},
"quotes": [
{
"name": "product-upfront",
"netPrice": 1000,
"discountAmount": -200,
"taxAmount": 200,
"grossPrice": 1000,
"paymentMethods": {
"stripe": {
"maxAmount": 2000
}
},
"meta": {
"pricingPlan": {
"id": "pp_xxxxxxxxxxxxxxxxxxxxxxxxxx",
"seasonId": "sea_xxxxxxxxxxxxxxxxxxxxxxxxxx",
"pricingModel": "per-lesson",
"firstPaymentDate": "2023-12-05",
"numberOfInstallments": 100,
"type": "one-off",
"discount": 42.0,
"enabled": true,
"installmentDates": [
"2025-05-04T09:42:00Z"
]
},
"currentInstalment": 42,
"remainingInstalments": 42,
"installmentDates": [
"string"
]
}
}
]
}
],
"dropIns": [
{
"basketItem": {
"studentId": "stu_xxx",
"courseId": "cls_xxx",
"date": "2025-01-01",
"time": "09:30",
"type": "trial"
},
"price": {
"netPrice": 1000,
"discountAmount": -200,
"taxAmount": 200,
"grossPrice": 1000
},
"quotes": [
{
"name": "product-upfront",
"netPrice": 1000,
"discountAmount": -200,
"taxAmount": 200,
"grossPrice": 1000,
"paymentMethods": {
"stripe": {
"maxAmount": 2000
}
},
"meta": {
"pricingPlan": {
"id": "pp_xxxxxxxxxxxxxxxxxxxxxxxxxx",
"seasonId": "sea_xxxxxxxxxxxxxxxxxxxxxxxxxx",
"pricingModel": "per-lesson",
"firstPaymentDate": "2023-12-05",
"numberOfInstallments": 100,
"type": "one-off",
"discount": 42.0,
"enabled": true,
"installmentDates": [
"2025-05-04T09:42:00Z"
]
},
"currentInstalment": 42,
"remainingInstalments": 42,
"installmentDates": [
"string"
]
}
}
]
}
],
"products": [
{
"basketItem": {
"variantId": "var_xxx",
"quantity": 1
},
"price": {
"netPrice": 1000,
"discountAmount": -200,
"taxAmount": 200,
"grossPrice": 1000
},
"quotes": [
{
"name": "product-upfront",
"netPrice": 1000,
"discountAmount": -200,
"taxAmount": 200,
"grossPrice": 1000,
"paymentMethods": {
"stripe": {
"maxAmount": 2000
}
},
"meta": {
"pricingPlan": {
"id": "pp_xxxxxxxxxxxxxxxxxxxxxxxxxx",
"seasonId": "sea_xxxxxxxxxxxxxxxxxxxxxxxxxx",
"pricingModel": "per-lesson",
"firstPaymentDate": "2023-12-05",
"numberOfInstallments": 100,
"type": "one-off",
"discount": 42.0,
"enabled": true,
"installmentDates": [
"2025-05-04T09:42:00Z"
]
},
"currentInstalment": 42,
"remainingInstalments": 42,
"installmentDates": [
"string"
]
}
}
]
}
],
"additionals": [
{
"basketItem": {
"studentId": "stu_xxxxxxx",
"entityId": "reg_xxxxxx",
"type": "registration-fee"
},
"price": {
"netPrice": 1000,
"discountAmount": -200,
"taxAmount": 200,
"grossPrice": 1000
},
"quotes": [
{
"name": "product-upfront",
"netPrice": 1000,
"discountAmount": -200,
"taxAmount": 200,
"grossPrice": 1000,
"paymentMethods": {
"stripe": {
"maxAmount": 2000
}
},
"meta": {
"pricingPlan": {
"id": "pp_xxxxxxxxxxxxxxxxxxxxxxxxxx",
"seasonId": "sea_xxxxxxxxxxxxxxxxxxxxxxxxxx",
"pricingModel": "per-lesson",
"firstPaymentDate": "2023-12-05",
"numberOfInstallments": 100,
"type": "one-off",
"discount": 42.0,
"enabled": true,
"installmentDates": [
"2025-05-04T09:42:00Z"
]
},
"currentInstalment": 42,
"remainingInstalments": 42,
"installmentDates": [
"string"
]
}
}
]
}
]
},
"balance": 100
}