Configure Submerchant Markup
curl --request PUT \
--url https://api.sandbox.wepayout.com.br/v2/account/{merchantId}/submerchants/{subMerchantId}/markups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"markups": {
"product": "<string>",
"payment_method": "<string>",
"mode": "<string>",
"amount": 123,
"min_charge_value": 123,
"max_charge_value": 123
}
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/account/{merchantId}/submerchants/{subMerchantId}/markups"
payload = { "markups": {
"product": "<string>",
"payment_method": "<string>",
"mode": "<string>",
"amount": 123,
"min_charge_value": 123,
"max_charge_value": 123
} }
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({
markups: {
product: '<string>',
payment_method: '<string>',
mode: '<string>',
amount: 123,
min_charge_value: 123,
max_charge_value: 123
}
})
};
fetch('https://api.sandbox.wepayout.com.br/v2/account/{merchantId}/submerchants/{subMerchantId}/markups', 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/{merchantId}/submerchants/{subMerchantId}/markups",
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([
'markups' => [
'product' => '<string>',
'payment_method' => '<string>',
'mode' => '<string>',
'amount' => 123,
'min_charge_value' => 123,
'max_charge_value' => 123
]
]),
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/{merchantId}/submerchants/{subMerchantId}/markups"
payload := strings.NewReader("{\n \"markups\": {\n \"product\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123\n }\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.sandbox.wepayout.com.br/v2/account/{merchantId}/submerchants/{subMerchantId}/markups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"markups\": {\n \"product\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/account/{merchantId}/submerchants/{subMerchantId}/markups")
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 \"markups\": {\n \"product\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 1234,
"name": "Store X",
"legal_name": "Store X LTDA",
"document": "12345678000190",
"has_markup": true,
"payin": [
{
"id": 61,
"payment_method": "pix",
"mode": "percent",
"amount": "1.40",
"min_charge_value": "1.00",
"max_charge_value": "5.00"
}
],
"payout": [],
"updated_at": "2026-09-29 14:02:37"
}
{
"message": "The given data was invalid.",
"errors": {
"markups.0.payment_method": [
"The payment method ted is not allowed with product payin."
],
"markups.1.min_charge_value": [
"Minimum and maximum values are required when the mode is percent."
],
"markups.2.min_charge_value": [
"Minimum and maximum values do not apply to the fixed mode."
],
"markups.3.max_charge_value": [
"The minimum value cannot be greater than the maximum value."
],
"markups.4.payment_method": [
"There is more than one configuration for the same product and payment method."
]
}
}
{
"message": "The given data was invalid.",
"errors": {
"subMerchantId": [
"The subaccount 7777 does not belong to this account."
]
}
}
{
"error": "Failed to create markup."
}
Submerchant
Configure Submerchant Markup
Create or replace the markup configuration of a submerchant.
PUT
/
v2
/
account
/
{merchantId}
/
submerchants
/
{subMerchantId}
/
markups
Configure Submerchant Markup
curl --request PUT \
--url https://api.sandbox.wepayout.com.br/v2/account/{merchantId}/submerchants/{subMerchantId}/markups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"markups": {
"product": "<string>",
"payment_method": "<string>",
"mode": "<string>",
"amount": 123,
"min_charge_value": 123,
"max_charge_value": 123
}
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/account/{merchantId}/submerchants/{subMerchantId}/markups"
payload = { "markups": {
"product": "<string>",
"payment_method": "<string>",
"mode": "<string>",
"amount": 123,
"min_charge_value": 123,
"max_charge_value": 123
} }
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({
markups: {
product: '<string>',
payment_method: '<string>',
mode: '<string>',
amount: 123,
min_charge_value: 123,
max_charge_value: 123
}
})
};
fetch('https://api.sandbox.wepayout.com.br/v2/account/{merchantId}/submerchants/{subMerchantId}/markups', 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/{merchantId}/submerchants/{subMerchantId}/markups",
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([
'markups' => [
'product' => '<string>',
'payment_method' => '<string>',
'mode' => '<string>',
'amount' => 123,
'min_charge_value' => 123,
'max_charge_value' => 123
]
]),
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/{merchantId}/submerchants/{subMerchantId}/markups"
payload := strings.NewReader("{\n \"markups\": {\n \"product\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123\n }\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.sandbox.wepayout.com.br/v2/account/{merchantId}/submerchants/{subMerchantId}/markups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"markups\": {\n \"product\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/account/{merchantId}/submerchants/{subMerchantId}/markups")
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 \"markups\": {\n \"product\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 1234,
"name": "Store X",
"legal_name": "Store X LTDA",
"document": "12345678000190",
"has_markup": true,
"payin": [
{
"id": 61,
"payment_method": "pix",
"mode": "percent",
"amount": "1.40",
"min_charge_value": "1.00",
"max_charge_value": "5.00"
}
],
"payout": [],
"updated_at": "2026-09-29 14:02:37"
}
{
"message": "The given data was invalid.",
"errors": {
"markups.0.payment_method": [
"The payment method ted is not allowed with product payin."
],
"markups.1.min_charge_value": [
"Minimum and maximum values are required when the mode is percent."
],
"markups.2.min_charge_value": [
"Minimum and maximum values do not apply to the fixed mode."
],
"markups.3.max_charge_value": [
"The minimum value cannot be greater than the maximum value."
],
"markups.4.payment_method": [
"There is more than one configuration for the same product and payment method."
]
}
}
{
"message": "The given data was invalid.",
"errors": {
"subMerchantId": [
"The subaccount 7777 does not belong to this account."
]
}
}
{
"error": "Failed to create markup."
}
Configure Submerchant Markup
Use this endpoint to set a submerchant’s own markup for each product and payment method. The submerchant’s markup takes priority over the merchant’s global markup, but not over an inlinemarkup sent in the request.
This endpoint replaces the whole configuration. Every call removes the submerchant’s current markups and saves only the items in
markups. Any product and payment method you leave out goes back to the global markup.Path Parameters
integer
required
ID of the merchant (parent account). It must be one of the authenticated user’s companies.
integer
required
ID of the submerchant. It must be a submerchant of
merchantId.Request Body
array[object]
required
Markup configurations for the submerchant. Send between
1 and 8 items, and at most one item for each product and payment_method pair.Show Markup Object
Show Markup Object
string
required
Product where the markup will be applied.Allowed values:
payin, payoutstring
required
Payment method where the markup will be applied.Allowed values:
- For
payin:pix,billet,credit_card - For
payout:pix,ted
string
required
Type of markup to be applied.Allowed values:
fixed: fixed amount (BRL) per transactionpercent: percentage over the transaction amount
number
required
Markup value. In BRL when
mode is fixed, and a percentage when mode is percent (1.5 means 1.5%).Must be greater than or equal to 0.01.number
Minimum markup amount (BRL) when
mode is percent.Business rules:- Required when
mode=percent - Prohibited when
mode=fixed - Must be greater than or equal to
0.01
number
Maximum markup amount (BRL) when
mode is percent.Business rules:- Required when
mode=percent - Prohibited when
mode=fixed - Must be greater than or equal to
min_charge_value
Unlike the global markup, a submerchant markup with
mode = percent requires both min_charge_value and max_charge_value.Request Examples
{
"markups": [
{
"product": "payin",
"payment_method": "pix",
"mode": "percent",
"amount": 1.4,
"min_charge_value": 1.0,
"max_charge_value": 5.0
},
{
"product": "payin",
"payment_method": "billet",
"mode": "fixed",
"amount": 2.0
},
{
"product": "payout",
"payment_method": "pix",
"mode": "fixed",
"amount": 0.8
}
]
}
curl -X PUT "https://api.sandbox.wepayout.com.br/v2/account/123/submerchants/1234/markups" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"markups": [
{
"product": "payin",
"payment_method": "pix",
"mode": "percent",
"amount": 1.4,
"min_charge_value": 1.0,
"max_charge_value": 5.0
}
]
}'
Response
Returns the submerchant with its updated markup, with the same fields as Get Submerchant Markup.{
"id": 1234,
"name": "Store X",
"legal_name": "Store X LTDA",
"document": "12345678000190",
"has_markup": true,
"payin": [
{
"id": 61,
"payment_method": "pix",
"mode": "percent",
"amount": "1.40",
"min_charge_value": "1.00",
"max_charge_value": "5.00"
}
],
"payout": [],
"updated_at": "2026-09-29 14:02:37"
}
{
"message": "The given data was invalid.",
"errors": {
"markups.0.payment_method": [
"The payment method ted is not allowed with product payin."
],
"markups.1.min_charge_value": [
"Minimum and maximum values are required when the mode is percent."
],
"markups.2.min_charge_value": [
"Minimum and maximum values do not apply to the fixed mode."
],
"markups.3.max_charge_value": [
"The minimum value cannot be greater than the maximum value."
],
"markups.4.payment_method": [
"There is more than one configuration for the same product and payment method."
]
}
}
{
"message": "The given data was invalid.",
"errors": {
"subMerchantId": [
"The subaccount 7777 does not belong to this account."
]
}
}
{
"error": "Failed to create markup."
}
Related Resources
Batch Apply Submerchant Markup
Apply the same markup to many submerchants
Remove Submerchant Markup
Go back to the global markup
About Markup
Learn about markup types and configuration levels
Create Merchant Markup
Configure the global markup
Was this page helpful?

