# Adding the payment methods

Adds the new payment method for the specific e-shop.


If you are a Premium client, contact your Account or Onboarding
manager and request the creation of a new gateway identifier. New
payment gateway has to be approved by Shoptet and client needs to be
familiar with the terms of payment in advance.


The request body includes the mandatory attributes name and
paymentType. The other parameters are not mandatory and their default
values will be used:


- description - null


- visibility - false


- wholesale - false


- logo - null


Send the logo of the payment gateway as the file content, encoded with
base64, in data.logo.content request item.


Please note that name cannot be longer than 255 characters.

Endpoint: POST /api/payment-methods
Version: 1.0.0
Security: shoptetAccessToken, shoptetPrivateApiToken

## Header parameters:

  - `Content-Type` (string, required)

## Request fields (application/json):

  - `data` (object, required)

  - `data.name` (string, required)
    name of the payment method

  - `data.description` (string,null)
    description of payment method

  - `data.submethod` (string,null)
    Additional identification of payment method

  - `data.paymentType` (string, required)
    type of payment (operator) - identifier assigned by Shoptet

  - `data.visibility` (boolean)
    whether the payment method will be visible

  - `data.wholesale` (boolean)
    flag, whether the payment method is available for wholesale customers (true = for retail)

  - `data.logo` (object)

  - `data.logo.filename` (string, required)
    file name

  - `data.logo.content` (string, required)
    base64 encoded package

## Response 200 fields (application/json):

  - `data` (object, required)

  - `data.guid` (string, required)
    payment method GUID

  - `data.name` (string, required)
    name of payment gateway, as can be seen in e-shop

  - `data.description` (string,null, required)
    additional information about the gateway

  - `data.submethod` (string,null, required)
    additional identification of payment method

  - `data.visibility` (boolean, required)
    Is the payment method visible?

  - `data.wholesale` (boolean, required)
    Is the payment method available for wholesale?

  - `data.logoUrl` (string,null, required)
    URL of payment method logo

  - `data.paymentType` (object, required)
    payment method

  - `data.paymentType.id` (integer, required)
    payment method ID

  - `data.paymentType.code` (string, required)
    identifier of the payment type (payment method operator).

  - `data.paymentType.name` (string, required)
    name of the payment type (payment method operator).

  - `errors` (array,null, required)

  - `errors.errorCode` (string, required)
    Short text error identification

  - `errors.message` (string, required)
    Descriptive error message

  - `errors.instance` (string, required)
    Identification of the entity referenced

  - `metadata` (object, required)

  - `metadata.requestId` (string, required)
    Request identifier. Useful for logging/reporting purposes.


