Preview: SendMock has no stable release yet. These docs follow develop.

API reference

Checkout

POST/api/v1/checkout-sessions/{sessionId}/complete

Pay, decline or cancel from the checkout page.

CLI
sendmock payments checkout complete <sessionId> <action>
MCP tool
sendmock_checkout_complete
In the app
Test checkout page > pay, Test controls

Request body (application/json)

CheckoutCompleteRequest : Body of POST /api/v1/checkout-sessions/{sessionId}/complete.

FieldTypeDescription
actionCheckoutAction
What the customer does: pay, decline, cancel, delay (pending), require_three_ds, three_ds_approve or three_ds_fail.One of: pay, decline, cancel, delay, require_three_ds, three_ds_approve, three_ds_failExample: pay
method_key?string
The method the customer paid with.Example: card
card?CheckoutCard
The card typed, for card methods.
entries?CheckoutStepEntries
What was typed in the flow's other steps.
decline_reason?DeclineReason
For decline: why the bank declined.One of: insufficient_funds, expired_card, incorrect_cvc, generic_decline, fraudulent, authentication_failedExample: insufficient_funds

Answer

200 CheckoutSession

Errors: 400, 404, 409, 422, as { error: { code, message } }

Try it in Demo mode