Update Merchant Markup Configuration
curl --request PATCH \
--url https://api.sandbox.wepayout.com.br/v2/account/markup/{markupId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "<string>",
"amount": 123,
"min_charge_value": 123,
"max_charge_value": 123,
"enabled": true
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/account/markup/{markupId}"
payload = {
"mode": "<string>",
"amount": 123,
"min_charge_value": 123,
"max_charge_value": 123,
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mode: '<string>',
amount: 123,
min_charge_value: 123,
max_charge_value: 123,
enabled: true
})
};
fetch('https://api.sandbox.wepayout.com.br/v2/account/markup/{markupId}', 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.sandbox.wepayout.com.br/v2/account/markup/{markupId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'mode' => '<string>',
'amount' => 123,
'min_charge_value' => 123,
'max_charge_value' => 123,
'enabled' => true
]),
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.sandbox.wepayout.com.br/v2/account/markup/{markupId}"
payload := strings.NewReader("{\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123,\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.sandbox.wepayout.com.br/v2/account/markup/{markupId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123,\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/account/markup/{markupId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123,\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 1234,
"product": "payin",
"payment_method": "pix",
"account_id": 987,
"parent_id": null,
"type": "global",
"mode": "fixed",
"amount": 10.0,
"min_charge_value": null,
"max_charge_value": null,
"enabled": false,
"created_at": "2025-01-01 12:00:00",
"updated_at": "2025-01-10 09:30:00"
}
{
"message": "Dados inválidos.",
"errors": {
"min_charge_value": [
"O campo min_charge_value é obrigatório quando mode é percent."
]
}
}
Account
Update Merchant Markup Configuration
Update markup configuration for a merchant by markup ID.
PATCH
/
v2
/
account
/
markup
/
{markupId}
Update Merchant Markup Configuration
curl --request PATCH \
--url https://api.sandbox.wepayout.com.br/v2/account/markup/{markupId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "<string>",
"amount": 123,
"min_charge_value": 123,
"max_charge_value": 123,
"enabled": true
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/account/markup/{markupId}"
payload = {
"mode": "<string>",
"amount": 123,
"min_charge_value": 123,
"max_charge_value": 123,
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mode: '<string>',
amount: 123,
min_charge_value: 123,
max_charge_value: 123,
enabled: true
})
};
fetch('https://api.sandbox.wepayout.com.br/v2/account/markup/{markupId}', 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.sandbox.wepayout.com.br/v2/account/markup/{markupId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'mode' => '<string>',
'amount' => 123,
'min_charge_value' => 123,
'max_charge_value' => 123,
'enabled' => true
]),
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.sandbox.wepayout.com.br/v2/account/markup/{markupId}"
payload := strings.NewReader("{\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123,\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.sandbox.wepayout.com.br/v2/account/markup/{markupId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123,\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/account/markup/{markupId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123,\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 1234,
"product": "payin",
"payment_method": "pix",
"account_id": 987,
"parent_id": null,
"type": "global",
"mode": "fixed",
"amount": 10.0,
"min_charge_value": null,
"max_charge_value": null,
"enabled": false,
"created_at": "2025-01-01 12:00:00",
"updated_at": "2025-01-10 09:30:00"
}
{
"message": "Dados inválidos.",
"errors": {
"min_charge_value": [
"O campo min_charge_value é obrigatório quando mode é percent."
]
}
}
Update Merchant Markup Configuration
Use this endpoint to update an existing markup configuration for a merchant, identified by itsmarkupId.
Path Parameters
Request Body
Markup mode to be applied.Allowed values:
fixedpercent
- Required if you send any of these fields:
amount,min_charge_value,max_charge_value.
Minimum markup amount when mode is
percent.Business rules:- Required when
mode=percent - Prohibited when
mode=fixed - Must be greater than or equal to
0.01
Maximum markup amount when mode is
percent.Business rules:- Optional
- Must be greater than or equal to
min_charge_value - Prohibited when
mode=fixed
Mode and range rules
- If you send any of
amount,min_charge_valueormax_charge_value, you must also sendmode. - When
mode = fixed, you must not sendmin_charge_valueormax_charge_value. - When
mode = percent, you must sendmin_charge_value, andmax_charge_valueis optional but must be greater than or equal tomin_charge_valuewhen provided.
Special rule when changing modeIf you change the mode from
percent to fixed, the service will internally reset:min_charge_value = nullmax_charge_value = null
Request Examples
curl -X PATCH "https://api.sandbox.wepayout.com.br/v2/account/markup/1234" \
-H "Authorization: Bearer SEU_TOKEN_AQUI" \
-H "Content-Type: application/json" \
-d '{
"mode": "fixed",
"amount": 10.0,
"enabled": false
}'
curl -X PATCH "https://api.sandbox.wepayout.com.br/v2/account/markup/1234" \
-H "Authorization: Bearer SEU_TOKEN_AQUI" \
-H "Content-Type: application/json" \
-d '{
"mode": "percent",
"amount": 2.5
}'
curl -X PATCH "https://api.sandbox.wepayout.com.br/v2/account/markup/1234" \
-H "Authorization: Bearer SEU_TOKEN_AQUI" \
-H "Content-Type: application/json" \
-d '{
"enabled": false
}'
Response
{
"id": 1234,
"product": "payin",
"payment_method": "pix",
"account_id": 987,
"parent_id": null,
"type": "global",
"mode": "fixed",
"amount": 10.0,
"min_charge_value": null,
"max_charge_value": null,
"enabled": false,
"created_at": "2025-01-01 12:00:00",
"updated_at": "2025-01-10 09:30:00"
}
{
"message": "Dados inválidos.",
"errors": {
"min_charge_value": [
"O campo min_charge_value é obrigatório quando mode é percent."
]
}
}
Related Resources
Create Merchant Markup
Create new markup configurations
List Merchant Markups
View all markup configurations
About Markup
Learn about markup types and configuration levels
Create Payin with Global Markup
Use global markup when creating payin charges
Was this page helpful?

