post https://api.zenskar.com/checkout//confirm
Confirm a checkout session to finalize the purchase, create a contract, and handle payment processing.
Confirmation modes (confirmation):
- charge_immediately: Redirect to payment gateway to collect payment now; with redirect=true returns 302 Location, otherwise 200 JSON.
- charge_when_due: Do not charge now; requires an existing saved payment method; creates contract and schedules payment.
- no_payment: Skip payments (free/internal flows); creates contract without charging.
Common use cases:
- Self-service checkout: Use charge_immediately with redirect=true to send users to payment gateway
- Enterprise deals: Use charge_when_due for customers with payment terms
- Free plans or trials: Use no_payment to create contract without payment processing
- Guest checkout completion: Creates customer profile and associates with contract
Behavior & requirements:
- Only 'open' sessions can be confirmed
- charge_when_due requires at least one saved payment method
- Guest checkout creates the customer profile during confirmation
- redirect=true returns an HTTP 302 redirect for immediate collection flows
- Successful confirmation creates a contract in the system
- Payment status transitions from not_started to pending, paid, or no_payment_required
Related endpoints:
- POST /checkout_session: Create the session to be confirmed
- GET /checkout_session/{id}: Check session status before confirming
- PUT /checkout_session/{id}: Update details before confirming
- POST /checkout_session/{id}/cancel: Cancel instead of confirming
Errors include invalid status transitions, missing customer/payment methods, and contract creation failures.