Update Payment Method
curl --request PUT \
--url https://api.example.com/cabinet/admin/payment-methods/{method_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_enabled": true,
"display_name": "<string>",
"sub_options": {},
"min_amount_kopeks": 1,
"max_amount_kopeks": 1,
"user_type_filter": "<string>",
"first_topup_filter": "<string>",
"promo_group_filter_mode": "<string>",
"allowed_promo_group_ids": [
123
],
"reset_display_name": false,
"reset_min_amount": false,
"reset_max_amount": false
}
'import requests
url = "https://api.example.com/cabinet/admin/payment-methods/{method_id}"
payload = {
"is_enabled": True,
"display_name": "<string>",
"sub_options": {},
"min_amount_kopeks": 1,
"max_amount_kopeks": 1,
"user_type_filter": "<string>",
"first_topup_filter": "<string>",
"promo_group_filter_mode": "<string>",
"allowed_promo_group_ids": [123],
"reset_display_name": False,
"reset_min_amount": False,
"reset_max_amount": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
is_enabled: true,
display_name: '<string>',
sub_options: {},
min_amount_kopeks: 1,
max_amount_kopeks: 1,
user_type_filter: '<string>',
first_topup_filter: '<string>',
promo_group_filter_mode: '<string>',
allowed_promo_group_ids: [123],
reset_display_name: false,
reset_min_amount: false,
reset_max_amount: false
})
};
fetch('https://api.example.com/cabinet/admin/payment-methods/{method_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/cabinet/admin/payment-methods/{method_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'is_enabled' => true,
'display_name' => '<string>',
'sub_options' => [
],
'min_amount_kopeks' => 1,
'max_amount_kopeks' => 1,
'user_type_filter' => '<string>',
'first_topup_filter' => '<string>',
'promo_group_filter_mode' => '<string>',
'allowed_promo_group_ids' => [
123
],
'reset_display_name' => false,
'reset_min_amount' => false,
'reset_max_amount' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/cabinet/admin/payment-methods/{method_id}"
payload := strings.NewReader("{\n \"is_enabled\": true,\n \"display_name\": \"<string>\",\n \"sub_options\": {},\n \"min_amount_kopeks\": 1,\n \"max_amount_kopeks\": 1,\n \"user_type_filter\": \"<string>\",\n \"first_topup_filter\": \"<string>\",\n \"promo_group_filter_mode\": \"<string>\",\n \"allowed_promo_group_ids\": [\n 123\n ],\n \"reset_display_name\": false,\n \"reset_min_amount\": false,\n \"reset_max_amount\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/cabinet/admin/payment-methods/{method_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_enabled\": true,\n \"display_name\": \"<string>\",\n \"sub_options\": {},\n \"min_amount_kopeks\": 1,\n \"max_amount_kopeks\": 1,\n \"user_type_filter\": \"<string>\",\n \"first_topup_filter\": \"<string>\",\n \"promo_group_filter_mode\": \"<string>\",\n \"allowed_promo_group_ids\": [\n 123\n ],\n \"reset_display_name\": false,\n \"reset_min_amount\": false,\n \"reset_max_amount\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/cabinet/admin/payment-methods/{method_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_enabled\": true,\n \"display_name\": \"<string>\",\n \"sub_options\": {},\n \"min_amount_kopeks\": 1,\n \"max_amount_kopeks\": 1,\n \"user_type_filter\": \"<string>\",\n \"first_topup_filter\": \"<string>\",\n \"promo_group_filter_mode\": \"<string>\",\n \"allowed_promo_group_ids\": [\n 123\n ],\n \"reset_display_name\": false,\n \"reset_min_amount\": false,\n \"reset_max_amount\": false\n}"
response = http.request(request)
puts response.read_body{
"method_id": "<string>",
"sort_order": 123,
"is_enabled": true,
"default_display_name": "<string>",
"default_min_amount_kopeks": 123,
"default_max_amount_kopeks": 123,
"user_type_filter": "<string>",
"first_topup_filter": "<string>",
"promo_group_filter_mode": "<string>",
"is_provider_configured": true,
"display_name": "<string>",
"sub_options": {},
"available_sub_options": [
{
"id": "<string>",
"name": "<string>"
}
],
"min_amount_kopeks": 123,
"max_amount_kopeks": 123,
"allowed_promo_group_ids": [
123
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Cabinet Admin Payment Methods
Update Payment Method
Update a payment method configuration.
PUT
/
cabinet
/
admin
/
payment-methods
/
{method_id}
Update Payment Method
curl --request PUT \
--url https://api.example.com/cabinet/admin/payment-methods/{method_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_enabled": true,
"display_name": "<string>",
"sub_options": {},
"min_amount_kopeks": 1,
"max_amount_kopeks": 1,
"user_type_filter": "<string>",
"first_topup_filter": "<string>",
"promo_group_filter_mode": "<string>",
"allowed_promo_group_ids": [
123
],
"reset_display_name": false,
"reset_min_amount": false,
"reset_max_amount": false
}
'import requests
url = "https://api.example.com/cabinet/admin/payment-methods/{method_id}"
payload = {
"is_enabled": True,
"display_name": "<string>",
"sub_options": {},
"min_amount_kopeks": 1,
"max_amount_kopeks": 1,
"user_type_filter": "<string>",
"first_topup_filter": "<string>",
"promo_group_filter_mode": "<string>",
"allowed_promo_group_ids": [123],
"reset_display_name": False,
"reset_min_amount": False,
"reset_max_amount": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
is_enabled: true,
display_name: '<string>',
sub_options: {},
min_amount_kopeks: 1,
max_amount_kopeks: 1,
user_type_filter: '<string>',
first_topup_filter: '<string>',
promo_group_filter_mode: '<string>',
allowed_promo_group_ids: [123],
reset_display_name: false,
reset_min_amount: false,
reset_max_amount: false
})
};
fetch('https://api.example.com/cabinet/admin/payment-methods/{method_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/cabinet/admin/payment-methods/{method_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'is_enabled' => true,
'display_name' => '<string>',
'sub_options' => [
],
'min_amount_kopeks' => 1,
'max_amount_kopeks' => 1,
'user_type_filter' => '<string>',
'first_topup_filter' => '<string>',
'promo_group_filter_mode' => '<string>',
'allowed_promo_group_ids' => [
123
],
'reset_display_name' => false,
'reset_min_amount' => false,
'reset_max_amount' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/cabinet/admin/payment-methods/{method_id}"
payload := strings.NewReader("{\n \"is_enabled\": true,\n \"display_name\": \"<string>\",\n \"sub_options\": {},\n \"min_amount_kopeks\": 1,\n \"max_amount_kopeks\": 1,\n \"user_type_filter\": \"<string>\",\n \"first_topup_filter\": \"<string>\",\n \"promo_group_filter_mode\": \"<string>\",\n \"allowed_promo_group_ids\": [\n 123\n ],\n \"reset_display_name\": false,\n \"reset_min_amount\": false,\n \"reset_max_amount\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/cabinet/admin/payment-methods/{method_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_enabled\": true,\n \"display_name\": \"<string>\",\n \"sub_options\": {},\n \"min_amount_kopeks\": 1,\n \"max_amount_kopeks\": 1,\n \"user_type_filter\": \"<string>\",\n \"first_topup_filter\": \"<string>\",\n \"promo_group_filter_mode\": \"<string>\",\n \"allowed_promo_group_ids\": [\n 123\n ],\n \"reset_display_name\": false,\n \"reset_min_amount\": false,\n \"reset_max_amount\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/cabinet/admin/payment-methods/{method_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_enabled\": true,\n \"display_name\": \"<string>\",\n \"sub_options\": {},\n \"min_amount_kopeks\": 1,\n \"max_amount_kopeks\": 1,\n \"user_type_filter\": \"<string>\",\n \"first_topup_filter\": \"<string>\",\n \"promo_group_filter_mode\": \"<string>\",\n \"allowed_promo_group_ids\": [\n 123\n ],\n \"reset_display_name\": false,\n \"reset_min_amount\": false,\n \"reset_max_amount\": false\n}"
response = http.request(request)
puts response.read_body{
"method_id": "<string>",
"sort_order": 123,
"is_enabled": true,
"default_display_name": "<string>",
"default_min_amount_kopeks": 123,
"default_max_amount_kopeks": 123,
"user_type_filter": "<string>",
"first_topup_filter": "<string>",
"promo_group_filter_mode": "<string>",
"is_provider_configured": true,
"display_name": "<string>",
"sub_options": {},
"available_sub_options": [
{
"id": "<string>",
"name": "<string>"
}
],
"min_amount_kopeks": 123,
"max_amount_kopeks": 123,
"allowed_promo_group_ids": [
123
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Null to reset to default
Show child attributes
Show child attributes
Required range:
x >= 0Required range:
x >= 0Pattern:
^(all|telegram|email)$Pattern:
^(any|yes|no)$Pattern:
^(all|selected)$Response
Successful Response
Show child attributes
Show child attributes
⌘I
