GET/api/v1/payments/methods
Methods customers pay with, and their test values.
- CLI
sendmock payments methods list- MCP tool
sendmock_payment_method_list- In the app
- Payments > Methods
Answer
200 PaymentMethodDefinition[]
/api/v1/payments/methodsMethods customers pay with, and their test values.
sendmock payments methods listsendmock_payment_method_list200 PaymentMethodDefinition[]
/api/v1/payments/methodsAdd a custom method.
sendmock payments methods createsendmock_payment_method_createPaymentMethodInput : Body of POST and PATCH /api/v1/payments/methods; key and flow are fixed after creation.
| Field | Type | Description |
|---|---|---|
| key | string | The method's key; fixed after creation.Example: upay_wallet |
| name | string | The method's name on checkout pages.Example: Upay wallet |
| flow | string | The key of the flow its checkout runs.Example: wallet |
| accent | string | #rrggbb, used on checkout pages.Example: #e2136e |
| is_enabled | boolean | Off methods are hidden on checkout pages.Example: true |
| test_cards | TestCardValue[] | Read by a card form step. |
| test_numbers | TestNumberValue[] | Read by an account number or voucher code step. |
| otp | string | Read by an OTP step.Example: 123456 |
| pin | string | Read by a PIN step.Example: 12121 |
| default_outcome | "succeed" | "decline" | The outcome when the flow has no deciding step.One of: succeed, declineExample: succeed |
| test_account | string | Read by a signed-in account step.Example: [email protected] |
201 PaymentMethodDefinition
Errors: 400, as { error: { code, message } }
/api/v1/payments/methods/{methodKey}One payment method with its test values.
sendmock payments methods show <methodKey>sendmock_payment_method_get200 PaymentMethodDefinition
Errors: 404, as { error: { code, message } }
/api/v1/payments/methods/{methodKey}Change a method.
sendmock payments methods update <methodKey>sendmock_payment_method_updatePaymentMethodInput : Body of POST and PATCH /api/v1/payments/methods; key and flow are fixed after creation.
| Field | Type | Description |
|---|---|---|
| key | string | The method's key; fixed after creation.Example: upay_wallet |
| name | string | The method's name on checkout pages.Example: Upay wallet |
| flow | string | The key of the flow its checkout runs.Example: wallet |
| accent | string | #rrggbb, used on checkout pages.Example: #e2136e |
| is_enabled | boolean | Off methods are hidden on checkout pages.Example: true |
| test_cards | TestCardValue[] | Read by a card form step. |
| test_numbers | TestNumberValue[] | Read by an account number or voucher code step. |
| otp | string | Read by an OTP step.Example: 123456 |
| pin | string | Read by a PIN step.Example: 12121 |
| default_outcome | "succeed" | "decline" | The outcome when the flow has no deciding step.One of: succeed, declineExample: succeed |
| test_account | string | Read by a signed-in account step.Example: [email protected] |
200 PaymentMethodDefinition
Errors: 400, 404, as { error: { code, message } }
/api/v1/payments/methods/{methodKey}Delete a custom method; 409 while a gateway offers it.
sendmock payments methods delete <methodKey>sendmock_payment_method_delete204 No content
Errors: 404, 409, as { error: { code, message } }
/api/v1/payments/methods/{methodKey}/resetPut a built-in method back as shipped.
sendmock payments methods reset <methodKey>sendmock_payment_method_reset200 PaymentMethodDefinition
Errors: 404, 409, as { error: { code, message } }