Skip to content

MngUpdateCashierProviderConfig

Updates an existing Cashier payment provider configuration.

Provider configs define which provider/method/currency/country route is available and contain provider-specific JSON required by the payment module.

Use MngAddCashierProviderConfig to create a new provider config.

The update contract also supports transaction_type, execution_mode, payment_mode, display_name, description, and form_schema / form_schema_json. See MngAddCashierProviderConfig for their complete definitions and a manual crypto-withdrawal example. Fields omitted from an update retain their current values.

Access

SESSION_MANAGER, SESSION_ADMIN, SESSION_DEALER, SESSION_CRM_MANAGER, SESSION_CRM_ADMIN.

Requires set_finance. Both the current config and target updated brand must be inside manager brand scope.

Request Parameters

Name Type Required Description
id int Yes Existing config id
provider string Yes Provider code
brand string Yes Brand code
method string No Payment method marker
country string No Country filter
currency string No Currency filter
transaction_type int No 0 deposit, 1 withdrawal, 2 both
execution_mode int No 0 module, 1 manual execution
payment_mode string No Client UI mode, normally redirect or details
display_name string No Customer-facing method name
description string No Customer-facing method description
form_schema object No Dynamic details form schema; preferred object form
form_schema_json string No Same schema encoded as JSON; do not send together with form_schema
settings_json string No Optional non-secret provider settings JSON string
config_json string No Provider-specific configuration JSON string passed to the payment module during instance creation
min_amount double No Minimum payment amount
max_amount double No Maximum payment amount
sandbox int No 1 sandbox, 0 production
enabled int No 1 enabled, 0 disabled
sort_index int No Sorting priority

Request Example

{
  "command": "MngUpdateCashierProviderConfig",
  "extID": "1",
  "data": {
    "id": 1,
    "provider": "praxis",
    "brand": "ion4",
    "method": "card",
    "currency": "USD",
    "transaction_type": 0,
    "execution_mode": 0,
    "payment_mode": "redirect",
    "display_name": "Praxis Cashier",
    "description": "Hosted cashier redirect",
    "form_schema": {},
    "config_json": "{\"merchant_id\":\"merchant-id\",\"application_key\":\"application-key\",\"secret_key\":\"merchant-secret\",\"webhook_secret\":\"webhook-secret\",\"api_base_url\":\"https://api.praxis.example\",\"cashier_base_url\":\"https://cashier.praxis.example\",\"api_version\":\"1.3\",\"locale\":\"en\"}",
    "min_amount": 10.0,
    "max_amount": 5000.0,
    "sandbox": 0,
    "enabled": 1,
    "sort_index": 100
  }
}

Response

Returns the saved provider config. config_json is hidden in the response because it may contain provider credentials.

{
  "provider": {
    "id": 1,
    "provider": "praxis",
    "brand": "ion4",
    "method": "card",
    "country": "",
    "currency": "USD",
    "transaction_type": 0,
    "execution_mode": 0,
    "payment_mode": "redirect",
    "display_name": "Praxis Cashier",
    "description": "Hosted cashier redirect",
    "form_schema_json": "{}",
    "form_schema": {},
    "settings_json": "{}",
    "config_json": "",
    "min_amount": 10.0,
    "max_amount": 5000.0,
    "sandbox": 0,
    "enabled": 1,
    "sort_index": 100,
    "created_time": 1779270000,
    "updated_time": 1779270000
  }
}

Notes

  • Module configs (execution_mode = 0) require a matching loaded runtime provider module.
  • Manual configs (execution_mode = 1) do not require a module and must have a non-empty method.
  • config_json may contain sensitive provider credentials and is hidden in normal responses.
  • If enabled is 1, Cashier creates a dedicated payment provider instance with this config. The source .so is copied to var/sttrader/payments under a unique runtime name before dlopen.
  • If enabled is switched to 0, the active runtime instance for this config is destroyed and removed from routing.
  • Config changes are applied to Cashier cache immediately.
  • SQLite synchronization is queued through the Cashier DB strand.
  • Updating an enabled config recreates the payment instance with the new config. If initialization fails, the update is rejected.