curl --request POST \
--url https://checkout.kalixo.io/v1/test-helpers/checkout-sessions/{id}/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"outcome": "succeeded"
}
'{
"object": "checkout_session_simulation",
"checkout_session": "cs_01M75N56PRT5WA5G2JF25B20RK",
"payment": "pay_01M75N56PRT5WA5G2JF25B20RJ",
"outcome": "succeeded",
"attempt": {
"id": "att_01M75N56PRT5WA5G2JF25B20RM",
"status": "authorized",
"error": null
}
}Test helpers
Simulate a payment on a sandbox checkout session
Sandbox only. Pays an open checkout session without a shopper, so you can test your order flow and webhook handling end to end without a browser or 3D Secure.
The payment goes through Kalixo’s sandbox test processor, never a real payment provider.
Everything after that is the normal flow: payment.authorized, then payment.captured
once the capture is confirmed (or payment.failed), and checkout_session.completed.
You can refund the payment and simulate a dispute on it with
POST /v1/test-helpers/payments/{id}/dispute.
outcome | Result |
|---|---|
succeeded | Authorised and, with automatic capture, captured |
declined | Declined; the session stays open, so you can simulate again |
insufficient_funds | Declined with decline_code: insufficient_funds |
processing | Pending; the outcome arrives by webhook |
amount_mismatch | Reported with a different amount; Kalixo reverses it and sends payment.amount_mismatch |
Use a session the shopper has not paid on yet: a session with an attempt at a payment
provider returns session_has_attempts.
POST
/
v1
/
test-helpers
/
checkout-sessions
/
{id}
/
simulate
curl --request POST \
--url https://checkout.kalixo.io/v1/test-helpers/checkout-sessions/{id}/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"outcome": "succeeded"
}
'{
"object": "checkout_session_simulation",
"checkout_session": "cs_01M75N56PRT5WA5G2JF25B20RK",
"payment": "pay_01M75N56PRT5WA5G2JF25B20RJ",
"outcome": "succeeded",
"attempt": {
"id": "att_01M75N56PRT5WA5G2JF25B20RM",
"status": "authorized",
"error": null
}
}Authorizations
Headers
Body
application/json
Response
The simulated attempt and its immediate result. Webhooks follow.