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-nullvisibility-falsewholesale-falselogo-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
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/payment-methods
- https://api.myshoptet.comhttps://api.myshoptet.com/api/payment-methods
- shoptetAccessToken
- shoptetPrivateApiToken
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==="
}
}
}'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" } }