# m\_payment\_config

Source: https://zotonic.com/docs/3126/m_payment_config

URI: https://zotonic.com/id/3126

Language: en



Expose editable configuration for active payment modules.

```django
{% for field in m.payment_config.fields.mod_payment %}
    {{ field.label|escape }}
{% endfor %}
```

The `fields[module]` path returns field maps derived from the module's `-mod_config` declaration, including current values. Access requires `use.mod_admin_config`; secret values are included for these authorized administrators. Only mod\_payment and active modules directly depending on it are accepted.

`save(Module, Values, Context)` accepts a list of binary form keys and values, validates the complete submission and then writes settings individually. It also requires `z_acl:is_admin_editable/1`. Returns `ok`, `{error, eacces}` or `{error, invalid_config}`. Unknown and read-only fields are rejected. Unchecked checkboxes submit an empty binary; booleans are normalized before saving. Currency values are trimmed and uppercased. Empty credential fields clear their values. The submit message `{save, [{module, Module}]}` uses the same save API.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/3126?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/3126?language=en>)
