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

API reference

Payment flows

POST/api/v1/payments/flows

Add a flow.

CLI
sendmock payments flows create
MCP tool
sendmock_payment_flow_create
In the app
Payments > Flows > Add flow

Request body (application/json)

PaymentFlowInput : Body of POST and PATCH /api/v1/payments/flows; the key is fixed after creation.

FieldTypeDescription
keystring
The flow's key; fixed after creation.Example: wallet_otp
namestring
The flow's name.Example: Wallet with OTP
picker_tabstring
The checkout picker tab its methods show under, e.g. "Mobile banking".Example: Mobile banking
stepsPaymentFlowStep[]
The steps in order.

Answer

201 PaymentFlowDefinition

Errors: 400, as { error: { code, message } }

Try it in Demo mode

PATCH/api/v1/payments/flows/{flowKey}

Change a flow.

CLI
sendmock payments flows update <flowKey>
MCP tool
sendmock_payment_flow_update
In the app
Payments > Flows > flow > Save flow

Request body (application/json)

PaymentFlowInput : Body of POST and PATCH /api/v1/payments/flows; the key is fixed after creation.

FieldTypeDescription
keystring
The flow's key; fixed after creation.Example: wallet_otp
namestring
The flow's name.Example: Wallet with OTP
picker_tabstring
The checkout picker tab its methods show under, e.g. "Mobile banking".Example: Mobile banking
stepsPaymentFlowStep[]
The steps in order.

Answer

200 PaymentFlowDefinition

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

Try it in Demo mode

POST/api/v1/payments/flows/{flowKey}/steps

Add a step to a flow.

CLI
sendmock payments flows steps add <flowKey>
MCP tool
sendmock_payment_flow_step_add
In the app
Payments > Flows > flow > Add step

Request body (application/json)

PaymentFlowStepAddRequest : Body of POST /api/v1/payments/flows/{flowKey}/steps: one step, appended unless a position is given.

FieldTypeDescription
stepPaymentFlowStep
The step to add.
position?number
Zero-based; the end of the flow when left out.Example: 1

Answer

200 PaymentFlowDefinition

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

Try it in Demo mode

PATCH/api/v1/payments/flows/{flowKey}/steps/{stepIndex}

Change one step of a flow.

CLI
sendmock payments flows steps update <flowKey> <stepIndex>
MCP tool
sendmock_payment_flow_step_update
In the app
Payments > Flows > flow > step labels, Move up, Move down

Request body (application/json)

PaymentFlowStepUpdateRequest : Body of PATCH /api/v1/payments/flows/{flowKey}/steps/{stepIndex}.

FieldTypeDescription
position?number
Moves the step to this zero-based position.Example: 0
title?string
Shown above the step; may be empty.Example: Enter the code sent to your phone
field_label?string
The input's label; empty for steps without a field.Example: Verification code
hint?string
Small text under the input; {method} and {amount} are replaced.Example: We sent a 6 digit code to your {method} number.
button_label?string
The button's text.Example: Verify

Answer

200 PaymentFlowDefinition

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

Try it in Demo mode