sendmock payments methods create
Add a custom method.
sendmock payments methods create [flags]
| Flag | Type | Description |
|---|---|---|
| --key <key>required | string | The method's key; fixed after creation.Example: upay_wallet |
| --name <name>required | string | The method's name on checkout pages.Example: Upay wallet |
| --flow <flow>required | string | The key of the flow its checkout runs.Example: wallet |
| --accent <accent>required | string | #rrggbb, used on checkout pages.Example: #e2136e |
| --enabledrequired | boolean | Off methods are hidden on checkout pages. --no-enabled sets it to false. |
| --test-cards <test-cards>required | TestCardValue[] (JSON) | Read by a card form step.Example: [{"number":"4242424242424242","outcome":"succeed","decline_reason":"insufficient_funds"}] |
| --test-numbers <test-numbers>required | TestNumberValue[] (JSON) | Read by an account number or voucher code step.Example: [{"number":"01770000001","outcome":"succeed","decline_reason":"insufficient_funds"}] |
| --otp <otp>required | string | Read by an OTP step.Example: 123456 |
| --pin <pin>required | string | Read by a PIN step.Example: 12121 |
| --default-outcome <default-outcome>required | string | The outcome when the flow has no deciding step.One of: succeed, declineExample: succeed |
| --test-account <test-account>required | string | 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