{"openapi":"3.1.0","info":{"title":"marve-py-checkout-service","version":"0.1.0"},"paths":{"/checkout":{"get":{"tags":["Checkout"],"summary":"The signed-in user's live checkout","description":"The basket snapshot the cart service sent at checkout, with its totals and status. It lives for about a day; 404 when there is none.","operationId":"get_checkout_checkout_get","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"string"},"user_reference":{"type":["string","null"]},"products":{"type":"array","items":{"type":"object","additionalProperties":true}},"discount":{"type":["object","null"],"additionalProperties":true},"metadata":{"type":["object","null"],"additionalProperties":true},"status":{"type":"string"},"payment_session_reference":{"type":["string","null"]},"payment_method":{"type":["object","null"],"additionalProperties":true},"email":{"type":["string","null"]},"total_feature_quantity":{"type":"integer"},"total_bundle_quantity":{"type":"integer"},"total_price":{"type":"number"},"total_discount":{"type":"number"},"total_amount_saved":{"type":"number"},"total_amount_due":{"type":"number"},"created_at_timestamp":{"type":["string","null"]},"expires_at_timestamp":{"type":["string","null"]},"updated_at_timestamp":{"type":["string","null"]},"created_by_reference":{"type":["string","null"]},"updated_by_reference":{"type":["string","null"]}},"additionalProperties":true,"required":["reference","status","total_feature_quantity","total_bundle_quantity","total_price","total_discount","total_amount_saved","total_amount_due"],"example":{"reference":"11111111-1111-1111-1111-111111111111","user_reference":"22222222-2222-2222-2222-222222222222","products":[{"reference":"p1","name":"Ports","price":100.0}],"discount":{},"metadata":{"payment_method":{"method":"card","provider":"stripe","currency":"GBP"},"payment_details":{"payment_session_reference":"cs_test_123"}},"status":"paid","payment_session_reference":"cs_test_123","payment_method":{"method":"card","provider":"stripe","currency":"GBP"},"email":"jane@example.com","total_feature_quantity":1,"total_bundle_quantity":0,"total_price":100.0,"total_discount":0.0,"total_amount_saved":0.0,"total_amount_due":100.0,"created_at_timestamp":"2026-09-30T11:40:11.956026","expires_at_timestamp":"2026-10-01T11:40:11.956026","updated_at_timestamp":"2026-09-30T11:40:11.956026","created_by_reference":"22222222-2222-2222-2222-222222222222","updated_by_reference":"22222222-2222-2222-2222-222222222222"}},"example":{"reference":"11111111-1111-1111-1111-111111111111","user_reference":"22222222-2222-2222-2222-222222222222","products":[{"reference":"p1","name":"Ports","price":100.0}],"discount":{},"metadata":{"payment_method":{"method":"card","provider":"stripe","currency":"GBP"},"payment_details":{"payment_session_reference":"cs_test_123"}},"status":"paid","payment_session_reference":"cs_test_123","payment_method":{"method":"card","provider":"stripe","currency":"GBP"},"email":"jane@example.com","total_feature_quantity":1,"total_bundle_quantity":0,"total_price":100.0,"total_discount":0.0,"total_amount_saved":0.0,"total_amount_due":100.0,"created_at_timestamp":"2026-09-30T11:40:11.956026","expires_at_timestamp":"2026-10-01T11:40:11.956026","updated_at_timestamp":"2026-09-30T11:40:11.956026","created_by_reference":"22222222-2222-2222-2222-222222222222","updated_by_reference":"22222222-2222-2222-2222-222222222222"}}}},"401":{"description":"No token, an expired token, or not signed in","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}},"404":{"description":"No live checkout for this user: none started, already cancelled, or expired","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}},"500":{"description":"Unexpected failure, including a confirm body missing a field. Quote `error_reference` when reporting it","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Checkout"],"summary":"Cancel the live checkout","description":"Drops the signed-in user's live checkout. 404 when there is none.","operationId":"cancel_checkout_checkout_delete","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":["string","null"]},"message":{"type":"string"}},"additionalProperties":true,"required":["message"],"example":{"reference":"11111111-1111-1111-1111-111111111111","message":"Checkout with reference 22222222-2222-2222-2222-222222222222 confirmed and payment initiated"}},"example":{"reference":"11111111-1111-1111-1111-111111111111","message":"Checkout with reference 22222222-2222-2222-2222-222222222222 confirmed and payment initiated"}}}},"401":{"description":"No token, an expired token, or not signed in","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}},"404":{"description":"No live checkout for this user: none started, already cancelled, or expired","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}},"500":{"description":"Unexpected failure, including a confirm body missing a field. Quote `error_reference` when reporting it","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}}},"security":[{"HTTPBearer":[]}]}},"/checkout/confirm":{"post":{"tags":["Checkout"],"summary":"Confirm the checkout and start payment","description":"Records how the customer will pay and hands the checkout to the payment service. `method` is one of `card`, `bank_transfer`, `paypal`, `direct_debit`, and `provider` must suit it (`card`: `stripe` or `paypal`; `bank_transfer`: `bank` or `stripe`; `paypal`: `paypal`; `direct_debit`: `gocardless`).\n\nA super admin may confirm somebody else's checkout by adding `target_user_reference`; for anybody else it is ignored. A super admin's checkout with nothing to pay is marked paid at once.","operationId":"confirm_checkout_checkout_confirm_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"method":{"type":"string","enum":["card","bank_transfer","paypal","direct_debit"]},"provider":{"type":"string"},"currency":{"type":"string"},"target_user_reference":{"type":"string"}},"additionalProperties":true,"type":"object","required":["method","provider","currency"]},"example":{"method":"card","provider":"stripe","currency":"GBP"}}},"required":true},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":["string","null"]},"message":{"type":"string"}},"additionalProperties":true,"required":["message"],"example":{"reference":"11111111-1111-1111-1111-111111111111","message":"Checkout with reference 22222222-2222-2222-2222-222222222222 confirmed and payment initiated"}},"example":{"reference":"11111111-1111-1111-1111-111111111111","message":"Checkout with reference 22222222-2222-2222-2222-222222222222 confirmed and payment initiated"}}}},"400":{"description":"The payment method, provider or currency is not one the service accepts","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}},"401":{"description":"No token, an expired token, or not signed in","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}},"404":{"description":"No live checkout for this user: none started, already cancelled, or expired","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}},"500":{"description":"Unexpected failure, including a confirm body missing a field. Quote `error_reference` when reporting it","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}}},"security":[{"HTTPBearer":[]}]}},"/checkout/status":{"get":{"tags":["Checkout"],"summary":"Where the live checkout stands","description":"Status, amount due and when the checkout expires. 404 when there is none.","operationId":"get_checkout_status_checkout_status_get","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"string"},"status":{"type":"string"},"amount_due":{"type":"number"},"created_at":{"type":"string"},"expires_at":{"type":"string"},"metadata":{"type":["object","null"],"additionalProperties":true}},"additionalProperties":true,"required":["reference","status","amount_due","created_at","expires_at"],"example":{"reference":"11111111-1111-1111-1111-111111111111","status":"pending","amount_due":100.0,"created_at":"2026-09-30T11:18:37.192675","expires_at":"2026-10-01T10:46:57.192675","metadata":{}}},"example":{"reference":"11111111-1111-1111-1111-111111111111","status":"pending","amount_due":100.0,"created_at":"2026-09-30T11:18:37.192675","expires_at":"2026-10-01T10:46:57.192675","metadata":{}}}}},"401":{"description":"No token, an expired token, or not signed in","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}},"404":{"description":"No live checkout for this user: none started, already cancelled, or expired","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}},"500":{"description":"Unexpected failure, including a confirm body missing a field. Quote `error_reference` when reporting it","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}}},"security":[{"HTTPBearer":[]}]}},"/checkout/health":{"get":{"tags":["Checkout"],"summary":"Health check","operationId":"health_checkout_health_get","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"message":{"type":"string"}},"additionalProperties":true,"type":"object","required":["message"],"example":{"message":"marve-py-checkout-service is okay and running, fast!"}},"example":{"message":"marve-py-checkout-service is okay and running, fast!"}}}},"500":{"description":"Unexpected failure, including a confirm body missing a field. Quote `error_reference` when reporting it","content":{"application/json":{"schema":{"properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}}}}},"/checkout/history":{"get":{"tags":["Checkout"],"summary":"The signed-in user's paid checkouts","description":"Ten a page; `page=all` for the lot. With no orders `items` is `{\"checkout_history\": []}`, otherwise a list of checkouts.","operationId":"get_checkout_history_checkout_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Page number, or `all` for the whole history. Anything unusable reads as 1.","examples":["1"],"title":"Page"},"description":"Page number, or `all` for the whole history. Anything unusable reads as 1."},{"name":"ordering","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`field` ascending, `-field` descending. Default `-created_at_timestamp`.","examples":["-created_at_timestamp"],"title":"Ordering"},"description":"`field` ascending, `-field` descending. Default `-created_at_timestamp`."},{"name":"all","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search across reference, email, status, payment session, totals and dates.","title":"All"},"description":"Search across reference, email, status, payment session, totals and dates."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Partial, case-insensitive, e.g. `paid`. Any other checkout field filters the same way.","title":"Status"},"description":"Partial, case-insensitive, e.g. `paid`. Any other checkout field filters the same way."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string"},"user_reference":{"type":["string","null"]},"products":{"type":"array","items":{"type":"object","additionalProperties":true}},"discount":{"type":["object","null"],"additionalProperties":true},"metadata":{"type":["object","null"],"additionalProperties":true},"status":{"type":"string"},"payment_session_reference":{"type":["string","null"]},"payment_method":{"type":["object","null"],"additionalProperties":true},"email":{"type":["string","null"]},"total_feature_quantity":{"type":"integer"},"total_bundle_quantity":{"type":"integer"},"total_price":{"type":"number"},"total_discount":{"type":"number"},"total_amount_saved":{"type":"number"},"total_amount_due":{"type":"number"},"created_at_timestamp":{"type":["string","null"]},"expires_at_timestamp":{"type":["string","null"]},"updated_at_timestamp":{"type":["string","null"]},"created_by_reference":{"type":["string","null"]},"updated_by_reference":{"type":["string","null"]}},"additionalProperties":true,"required":["reference","status","total_feature_quantity","total_bundle_quantity","total_price","total_discount","total_amount_saved","total_amount_due"],"example":{"reference":"11111111-1111-1111-1111-111111111111","user_reference":"22222222-2222-2222-2222-222222222222","products":[{"reference":"p1","name":"Ports","price":100.0}],"discount":{},"metadata":{"payment_method":{"method":"card","provider":"stripe","currency":"GBP"},"payment_details":{"payment_session_reference":"cs_test_123"}},"status":"paid","payment_session_reference":"cs_test_123","payment_method":{"method":"card","provider":"stripe","currency":"GBP"},"email":"jane@example.com","total_feature_quantity":1,"total_bundle_quantity":0,"total_price":100.0,"total_discount":0.0,"total_amount_saved":0.0,"total_amount_due":100.0,"created_at_timestamp":"2026-09-30T11:40:11.956026","expires_at_timestamp":"2026-10-01T11:40:11.956026","updated_at_timestamp":"2026-09-30T11:40:11.956026","created_by_reference":"22222222-2222-2222-2222-222222222222","updated_by_reference":"22222222-2222-2222-2222-222222222222"}}},{"type":"object","properties":{"checkout_history":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true,"required":["checkout_history"]}]},"pagination":{"type":"object","properties":{"current_page":{"type":"integer"},"page_size":{"type":"integer"},"total_records":{"type":"integer"},"total_pages":{"type":"integer"},"has_next":{"type":"boolean"},"has_previous":{"type":"boolean"}},"additionalProperties":true,"required":["current_page","page_size","total_records","total_pages","has_next","has_previous"]}},"additionalProperties":true,"required":["items","pagination"],"example":{"items":{"checkout_history":[]},"pagination":{"current_page":1,"page_size":10,"total_records":0,"total_pages":0,"has_next":false,"has_previous":false}}},"example":{"items":{"checkout_history":[]},"pagination":{"current_page":1,"page_size":10,"total_records":0,"total_pages":0,"has_next":false,"has_previous":false}}}}},"401":{"description":"No token, an expired token, or not signed in","content":{"application/json":{"schema":{"type":"object","properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}},"500":{"description":"Unexpected failure, including a confirm body missing a field. Quote `error_reference` when reporting it","content":{"application/json":{"schema":{"type":"object","properties":{"error_reference":{"type":"string"},"error_type":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"status_code":{"type":"integer"},"timestamp":{"type":"string"}},"additionalProperties":true,"required":["error_reference","error_type","errors","status_code","timestamp"],"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}},"example":{"error_reference":"ceb75e9c-8f76-471a-bd6d-a3ac976a1bf0","error_type":"VALIDATION_ERROR","errors":{"method":["Method must be one of: card, bank_transfer, paypal, direct_debit"]},"status_code":400,"timestamp":"2026-09-30T11:19:02.585798"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"The access token from sign-in.","scheme":"bearer"}}}}