Skip to content

MngAddCashierProviderConfig

Creates a brand-level payment provider configuration.

Cashier uses normalized fields for routing and eligibility (provider, brand, method, currency, country, limits, enabled). Provider-specific credentials and behavior are stored in config_json and passed to the loaded payment module when the provider instance is created. Manual withdrawal configs use execution_mode = 1 and do not require a payment module.

Access

SESSION_MANAGER, SESSION_ADMIN, SESSION_DEALER, SESSION_CRM_MANAGER, SESSION_CRM_ADMIN.

Requires set_finance. Provider config brand must be inside manager brand scope.

Request Parameters

Name Type Required Description
provider string Yes Provider code returned by the payment module
brand string Yes Brand code
method string No Payment method marker, for example card
country string No Country filter. Empty means all countries
currency string No Currency filter. Empty means all currencies
transaction_type int No 0 deposit (default), 1 withdrawal, 2 both
execution_mode int No 0 module (default), 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
min_amount double No Minimum payment amount
max_amount double No Maximum payment amount. 0 means no limit
sandbox int No 1 sandbox, 0 production
enabled int No 1 enabled, 0 disabled
sort_index int No Sorting priority

Provider-specific values such as merchant ids, API keys, webhook secrets, terminal ids, and URLs must be stored inside config_json.

Request Example

{
  "command": "MngAddCashierProviderConfig",
  "extID": "1",
  "data": {
    "provider": "praxis",
    "brand": "ion4",
    "method": "card",
    "country": "",
    "currency": "USD",
    "settings_json": "{}",
    "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
  }
}

Manual crypto withdrawal example

{
  "command": "MngAddCashierProviderConfig",
  "extID": "manual-crypto-1",
  "data": {
    "provider": "manual",
    "brand": "ion4",
    "method": "crypto",
    "country": "",
    "currency": "USD",
    "transaction_type": 1,
    "execution_mode": 1,
    "payment_mode": "details",
    "display_name": "Cryptocurrency",
    "description": "Manual cryptocurrency withdrawal",
    "form_schema": {
      "fields": [
        {"name":"asset","type":"select","required":true,"options":["USDT","BTC"]},
        {"name":"network","type":"select","required":true,"depends_on":"asset","options_by":{"USDT":["TRC20","ERC20"],"BTC":["Bitcoin"]}},
        {"name":"address","type":"string","required":true,"min_length":10,"max_length":256},
        {"name":"memo","type":"string","required":false,"max_length":128}
      ]
    },
    "min_amount": 50.0,
    "max_amount": 10000.0,
    "enabled": 1,
    "sort_index": 10
  }
}

Response

Returns the created provider config. Sensitive fields, including config_json, are hidden in the response.

{
  "provider": {
    "id": 1,
    "provider": "praxis",
    "brand": "ion4",
    "method": "card",
    "country": "",
    "currency": "USD",
    "transaction_type": 0,
    "execution_mode": 0,
    "payment_mode": "",
    "display_name": "",
    "description": "",
    "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 payment module.
  • Manual configs (execution_mode = 1) do not load or require a module and must have a non-empty method.
  • Supported form field types are string, select, number, integer, and boolean.
  • required, options, depends_on, options_by, min_length, and max_length are enforced by the server when a withdrawal is created.
  • Config is applied to Cashier cache immediately.
  • SQLite synchronization is queued through the Cashier DB strand.
  • If enabled is 1, Cashier copies the matching provider .so to var/sttrader/payments under a unique runtime name and creates a dedicated provider instance with this config.
  • One payment module can have multiple configs for different brands, methods, currencies, countries, or sandbox/prod routes.