# Payment methods

Payment methods can easily be installed via json file. For each payment method you need to create a json file in the *Resources/payment\_methods/* directory of your plugin or AdditionalBundle.

Payment methods will automatically be installed and updated.

{% code title="Resources/payment\_methods/my\_payment\_method.json" %}

```json
{
    "technicalName": "my_payment_method",
    "handlerIdentifier": "My\\PaymentMethod\\Handler", // optional
    "position": 1,                                     // optional
    "active": true,                                    // optional
    "afterOrderEnabled": false,                        // optional 
    "media": "logo.png",                               // optional
    "translations": {
        "de-DE": {
            "name": "Meine Zahlungsart",
            "description": "Ein Beschreibungstext"     // optional
        },
        "en-GB": {
            "name": "My payment method",
            "description": "A description text"        // optional
        }
    }
}
```

{% endcode %}

The fields *position, active, afterOrderEnabled, media, name* and *description* will only be installed - not updated. So the user can edit them in the Shopware administration.

The *media* field is optional and must contain the file name of the media file. The file will automatically be installed and must be found in *Resources/payment\_methods/* directory.

{% hint style="info" %}
Run `bin/console plugin:update <PluginName>` to update payment methods.
{% endhint %}
