Skip to content

Adding the payment methods

Request

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.

Security
shoptetAccessToken or shoptetPrivateApiToken
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataobjectrequired
curl -i -X POST \
  https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/payment-methods \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "name": "Gateway name",
      "description": "Description of payment method",
      "submethod": "apple-pay",
      "paymentType": "gopay",
      "visibility": true,
      "wholesale": true,
      "logo": {
        "filename": "logo_metody.png",
        "content": "VBORw0KGgoAAAANSUhEUgAAAHIAAAAiAQMAAAC5nR/JAAAABGdBT==="
      }
    }
  }'

Responses

OK

Bodyapplication/json
dataobjectrequired
errorsArray of objects or null(Errors)required
metadataobject(Metadata)required
Response
{ "data": { "guid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed", "name": "Cash on delivery", "description": "This is the test description", "submethod": "apple-pay", "visibility": true, "wholesale": true, "logoUrl": "https://www.example.com/logo.png", "paymentType": {} }, "errors": [ {} ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }