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

CLI reference

Payment methods commands

sendmock payments methods create

Add a custom method.

sendmock payments methods create [flags]
FlagTypeDescription
--key <key>requiredstring
The method's key; fixed after creation.Example: upay_wallet
--name <name>requiredstring
The method's name on checkout pages.Example: Upay wallet
--flow <flow>requiredstring
The key of the flow its checkout runs.Example: wallet
--accent <accent>requiredstring
#rrggbb, used on checkout pages.Example: #e2136e
--enabledrequiredboolean
Off methods are hidden on checkout pages. --no-enabled sets it to false.
--test-cards <test-cards>requiredTestCardValue[] (JSON)
Read by a card form step.Example: [{"number":"4242424242424242","outcome":"succeed","decline_reason":"insufficient_funds"}]
--test-numbers <test-numbers>requiredTestNumberValue[] (JSON)
Read by an account number or voucher code step.Example: [{"number":"01770000001","outcome":"succeed","decline_reason":"insufficient_funds"}]
--otp <otp>requiredstring
Read by an OTP step.Example: 123456
--pin <pin>requiredstring
Read by a PIN step.Example: 12121
--default-outcome <default-outcome>requiredstring
The outcome when the flow has no deciding step.One of: succeed, declineExample: succeed
--test-account <test-account>requiredstring
Read by a signed-in account step.Example: [email protected]

Example

sendmock payments methods create --key upay_wallet --name 'Upay wallet' --flow wallet --accent '#e2136e' --enabled --test-cards '[{"number":"4242424242424242","outcome":"succeed","decline_reason":"insufficient_funds"}]' --test-numbers '[{"number":"01770000001","outcome":"succeed","decline_reason":"insufficient_funds"}]' --otp 123456 --pin 12121 --default-outcome succeed --test-account [email protected]

Output with --json: PaymentMethodDefinition. Exit codes: 0, 1, 2.

API
POST/api/v1/payments/methods
MCP tool
sendmock_payment_method_create
In the app
Payments > Methods > Add method

sendmock payments methods delete

Delete a custom method; 409 while a gateway offers it.

sendmock payments methods delete <methodKey> [flags]
ArgumentTypeDescription
<methodKey>requiredstring
The payment method's key, e.g. bkash or card.Example: bkash
FlagTypeDescription
--yesboolean
Confirms a destructive command; without it the command stops.

Example

sendmock payments methods delete bkash --yes

Output with --json: nothing. Exit codes: 0, 1, 2, 3.

API
DELETE/api/v1/payments/methods/{methodKey}
MCP tool
sendmock_payment_method_delete
In the app
Payments > Methods > method > Delete

sendmock payments methods reset

Put a built-in method back as shipped.

sendmock payments methods reset <methodKey>
ArgumentTypeDescription
<methodKey>requiredstring
The payment method's key, e.g. bkash or card.Example: bkash

Example

sendmock payments methods reset bkash

Output with --json: PaymentMethodDefinition. Exit codes: 0, 1, 2, 3.

API
POST/api/v1/payments/methods/{methodKey}/reset
MCP tool
sendmock_payment_method_reset
In the app
Payments > Methods > method > Reset to default

sendmock payments methods show

One payment method with its test values.

sendmock payments methods show <methodKey>
ArgumentTypeDescription
<methodKey>requiredstring
The payment method's key, e.g. bkash or card.Example: bkash

Example

sendmock payments methods show bkash

Output with --json: PaymentMethodDefinition. Exit codes: 0, 1, 2, 3.

API
GET/api/v1/payments/methods/{methodKey}
MCP tool
sendmock_payment_method_get
In the app
Payments > Methods > Edit

sendmock payments methods update

Change a method.

sendmock payments methods update <methodKey> [flags]
ArgumentTypeDescription
<methodKey>requiredstring
The payment method's key, e.g. bkash or card.Example: bkash
FlagTypeDescription
--key <key>requiredstring
The method's key; fixed after creation.Example: upay_wallet
--name <name>requiredstring
The method's name on checkout pages.Example: Upay wallet
--flow <flow>requiredstring
The key of the flow its checkout runs.Example: wallet
--accent <accent>requiredstring
#rrggbb, used on checkout pages.Example: #e2136e
--enabledrequiredboolean
Off methods are hidden on checkout pages. --no-enabled sets it to false.
--test-cards <test-cards>requiredTestCardValue[] (JSON)
Read by a card form step.Example: [{"number":"4242424242424242","outcome":"succeed","decline_reason":"insufficient_funds"}]
--test-numbers <test-numbers>requiredTestNumberValue[] (JSON)
Read by an account number or voucher code step.Example: [{"number":"01770000001","outcome":"succeed","decline_reason":"insufficient_funds"}]
--otp <otp>requiredstring
Read by an OTP step.Example: 123456
--pin <pin>requiredstring
Read by a PIN step.Example: 12121
--default-outcome <default-outcome>requiredstring
The outcome when the flow has no deciding step.One of: succeed, declineExample: succeed
--test-account <test-account>requiredstring
Read by a signed-in account step.Example: [email protected]

Example

sendmock payments methods update bkash --key upay_wallet --name 'Upay wallet' --flow wallet --accent '#e2136e' --enabled --test-cards '[{"number":"4242424242424242","outcome":"succeed","decline_reason":"insufficient_funds"}]' --test-numbers '[{"number":"01770000001","outcome":"succeed","decline_reason":"insufficient_funds"}]' --otp 123456 --pin 12121 --default-outcome succeed --test-account [email protected]

Output with --json: PaymentMethodDefinition. Exit codes: 0, 1, 2, 3.

API
PATCH/api/v1/payments/methods/{methodKey}
MCP tool
sendmock_payment_method_update
In the app
Payments > Methods > method > Save method, enabled switch