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

MCP reference

Payment methods tools

sendmock_payment_method_create

Add a custom method.

Toolset payments.

    InputTypeDescription
    keyrequiredstring
    The method's key; fixed after creation.Example: upay_wallet
    namerequiredstring
    The method's name on checkout pages.Example: Upay wallet
    flowrequiredstring
    The key of the flow its checkout runs.Example: wallet
    accentrequiredstring
    #rrggbb, used on checkout pages.Example: #e2136e
    is_enabledrequiredboolean
    Off methods are hidden on checkout pages.Example: true
    test_cardsrequiredTestCardValue[]
    Read by a card form step.Example: [{"number":"4242424242424242","outcome":"succeed","decline_reason":"insufficient_funds"}]
    test_numbersrequiredTestNumberValue[]
    Read by an account number or voucher code step.Example: [{"number":"01770000001","outcome":"succeed","decline_reason":"insufficient_funds"}]
    otprequiredstring
    Read by an OTP step.Example: 123456
    pinrequiredstring
    Read by a PIN step.Example: 12121
    default_outcomerequiredstring
    The outcome when the flow has no deciding step.One of: succeed, declineExample: succeed
    test_accountrequiredstring
    Read by a signed-in account step.Example: [email protected]

    Example call

    {
      "name": "sendmock_payment_method_create",
      "arguments": {
        "key": "upay_wallet",
        "name": "Upay wallet",
        "flow": "wallet",
        "accent": "#e2136e",
        "is_enabled": true,
        "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]"
      }
    }

    Result: PaymentMethodDefinition

    API
    POST/api/v1/payments/methods
    CLI
    sendmock payments methods create
    In the app
    Payments > Methods > Add method

    sendmock_payment_method_delete

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

    Toolset payments.

    • Destructive
    • Idempotent
    InputTypeDescription
    method_keyrequiredstring
    The payment method's key, e.g. bkash or card.Example: bkash

    Example call

    {
      "name": "sendmock_payment_method_delete",
      "arguments": {
        "method_key": "bkash"
      }
    }

    Result: nothing

    API
    DELETE/api/v1/payments/methods/{methodKey}
    CLI
    sendmock payments methods delete <methodKey>
    In the app
    Payments > Methods > method > Delete

    sendmock_payment_method_get

    One payment method with its test values.

    Toolset payments.

    • Read only
    InputTypeDescription
    method_keyrequiredstring
    The payment method's key, e.g. bkash or card.Example: bkash

    Example call

    {
      "name": "sendmock_payment_method_get",
      "arguments": {
        "method_key": "bkash"
      }
    }

    Result: PaymentMethodDefinition

    API
    GET/api/v1/payments/methods/{methodKey}
    CLI
    sendmock payments methods show <methodKey>
    In the app
    Payments > Methods > Edit

    sendmock_payment_method_list

    Methods customers pay with, and their test values.

    Toolset payments.

    • Read only

    No inputs.

    Example call

    {
      "name": "sendmock_payment_method_list",
      "arguments": {}
    }

    Result: PaymentMethodDefinition[]

    API
    GET/api/v1/payments/methods
    CLI
    sendmock payments methods list
    In the app
    Payments > Methods

    sendmock_payment_method_reset

    Put a built-in method back as shipped.

    Toolset payments.

      InputTypeDescription
      method_keyrequiredstring
      The payment method's key, e.g. bkash or card.Example: bkash

      Example call

      {
        "name": "sendmock_payment_method_reset",
        "arguments": {
          "method_key": "bkash"
        }
      }

      Result: PaymentMethodDefinition

      API
      POST/api/v1/payments/methods/{methodKey}/reset
      CLI
      sendmock payments methods reset <methodKey>
      In the app
      Payments > Methods > method > Reset to default

      sendmock_payment_method_update

      Change a method.

      Toolset payments.

      • Idempotent
      InputTypeDescription
      method_keyrequiredstring
      The payment method's key, e.g. bkash or card.Example: bkash
      keyrequiredstring
      The method's key; fixed after creation.Example: upay_wallet
      namerequiredstring
      The method's name on checkout pages.Example: Upay wallet
      flowrequiredstring
      The key of the flow its checkout runs.Example: wallet
      accentrequiredstring
      #rrggbb, used on checkout pages.Example: #e2136e
      is_enabledrequiredboolean
      Off methods are hidden on checkout pages.Example: true
      test_cardsrequiredTestCardValue[]
      Read by a card form step.Example: [{"number":"4242424242424242","outcome":"succeed","decline_reason":"insufficient_funds"}]
      test_numbersrequiredTestNumberValue[]
      Read by an account number or voucher code step.Example: [{"number":"01770000001","outcome":"succeed","decline_reason":"insufficient_funds"}]
      otprequiredstring
      Read by an OTP step.Example: 123456
      pinrequiredstring
      Read by a PIN step.Example: 12121
      default_outcomerequiredstring
      The outcome when the flow has no deciding step.One of: succeed, declineExample: succeed
      test_accountrequiredstring
      Read by a signed-in account step.Example: [email protected]

      Example call

      {
        "name": "sendmock_payment_method_update",
        "arguments": {
          "method_key": "bkash",
          "key": "upay_wallet",
          "name": "Upay wallet",
          "flow": "wallet",
          "accent": "#e2136e",
          "is_enabled": true,
          "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]"
        }
      }

      Result: PaymentMethodDefinition

      API
      PATCH/api/v1/payments/methods/{methodKey}
      CLI
      sendmock payments methods update <methodKey>
      In the app
      Payments > Methods > method > Save method, enabled switch