Create Payout with Inline Markup
curl --request POST \
--url https://api.sandbox.wepayout.com.br/v2/payout/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"markup": {
"mode": "<string>",
"amount": 123,
"min_charge_value": 123,
"max_charge_value": 123
}
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/payout/payments"
payload = { "markup": {
"mode": "<string>",
"amount": 123,
"min_charge_value": 123,
"max_charge_value": 123
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
markup: {mode: '<string>', amount: 123, min_charge_value: 123, max_charge_value: 123}
})
};
fetch('https://api.sandbox.wepayout.com.br/v2/payout/payments', 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/payout/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'markup' => [
'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/payout/payments"
payload := strings.NewReader("{\n \"markup\": {\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.sandbox.wepayout.com.br/v2/payout/payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"markup\": {\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/payout/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"markup\": {\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": 12345,
"merchant": {
"id": 477,
"name": "Merchant Name"
},
"payment_method": "PIX",
"amount": "R$ 100,50",
"currency": "BRL",
"invoice": "e3317882-f821-455b-b082-dc3ba36e8a57",
"status": {
"id": 1,
"name": "Awaiting"
},
"beneficiary": {
"name": "John Doe",
"document": {
"type": "CPF",
"number": "12345678901"
}
},
"markup": {
"mode": "percent",
"amount": 2.5,
"min_charge_value": 0.50,
"max_charge_value": 10.00
},
"purpose": null,
"paid_at": null,
"created_at": "2024-01-15T10:30:00.000000Z",
"updated_at": "2024-01-15T10:30:00.000000Z"
}
{
"message": "The given data was invalid",
"errors": {
"markup": [
"Markup is only allowed for PIX payments"
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup.mode": [
"The selected markup.mode is invalid."
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup.amount": [
"The markup.amount must be at least 0.01."
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup.min_charge_value": [
"The markup.min_charge value field is required when markup.mode is percent."
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup.min_charge_value": [
"Invalid charge values for fixed mode"
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup": [
"Inline markup is required when no global markup is configured"
]
}
}
{
"message": "Internal error"
}
Payout
Create Payout with Inline Markup
Create a payout payment with inline markup configuration.
POST
/
v2
/
payout
/
payments
Create Payout with Inline Markup
curl --request POST \
--url https://api.sandbox.wepayout.com.br/v2/payout/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"markup": {
"mode": "<string>",
"amount": 123,
"min_charge_value": 123,
"max_charge_value": 123
}
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/payout/payments"
payload = { "markup": {
"mode": "<string>",
"amount": 123,
"min_charge_value": 123,
"max_charge_value": 123
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
markup: {mode: '<string>', amount: 123, min_charge_value: 123, max_charge_value: 123}
})
};
fetch('https://api.sandbox.wepayout.com.br/v2/payout/payments', 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/payout/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'markup' => [
'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/payout/payments"
payload := strings.NewReader("{\n \"markup\": {\n \"mode\": \"<string>\",\n \"amount\": 123,\n \"min_charge_value\": 123,\n \"max_charge_value\": 123\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.sandbox.wepayout.com.br/v2/payout/payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"markup\": {\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/payout/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"markup\": {\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": 12345,
"merchant": {
"id": 477,
"name": "Merchant Name"
},
"payment_method": "PIX",
"amount": "R$ 100,50",
"currency": "BRL",
"invoice": "e3317882-f821-455b-b082-dc3ba36e8a57",
"status": {
"id": 1,
"name": "Awaiting"
},
"beneficiary": {
"name": "John Doe",
"document": {
"type": "CPF",
"number": "12345678901"
}
},
"markup": {
"mode": "percent",
"amount": 2.5,
"min_charge_value": 0.50,
"max_charge_value": 10.00
},
"purpose": null,
"paid_at": null,
"created_at": "2024-01-15T10:30:00.000000Z",
"updated_at": "2024-01-15T10:30:00.000000Z"
}
{
"message": "The given data was invalid",
"errors": {
"markup": [
"Markup is only allowed for PIX payments"
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup.mode": [
"The selected markup.mode is invalid."
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup.amount": [
"The markup.amount must be at least 0.01."
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup.min_charge_value": [
"The markup.min_charge value field is required when markup.mode is percent."
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup.min_charge_value": [
"Invalid charge values for fixed mode"
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup": [
"Inline markup is required when no global markup is configured"
]
}
}
{
"message": "Internal error"
}
Create Payout with Inline Markup
When creating a payout payment, you can include aninline markup object in the request payload.
Inline markup takes precedence: If you send a
markup object in the payment creation request, it will override any global or submerchant markup configurations.Markup Object Structure
Themarkup object should be added to the request body when creating a payment via POST /v2/payout/payments.
object
Optional inline markup configuration for this specific payment.
Show Markup Object
Show Markup Object
string
required
How the markup value will be applied.Allowed values:
fixed: fixed amount per paymentpercent: percentage over the payment amount
number
required
Markup value to be applied.Constraints:
- Must be greater than or equal to
0.01
number
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
number
Maximum markup amount when mode is
percent.Business rules:- Optional
- Must be greater than or equal to
min_charge_value - Prohibited when
mode=fixed
When
mode is fixed, do not send min_charge_value or max_charge_value.Request Examples
{
"payment_method": "PIX",
"invoice": "e3317882-f821-455b-b082-dc3ba36e8a57",
"currency": "BRL",
"amount": 100.50,
"country": "BR",
"beneficiary": {
"name": "John Doe",
"document": {
"type": "CPF",
"number": "12345678901"
},
"pix": {
"key": "12345678901"
}
},
"markup": {
"mode": "percent",
"amount": 2.5,
"min_charge_value": 0.50,
"max_charge_value": 10.00
}
}
{
"payment_method": "PIX",
"invoice": "e3317882-f821-455b-b082-dc3ba36e8a57",
"currency": "BRL",
"amount": 100.50,
"country": "BR",
"beneficiary": {
"name": "John Doe",
"document": {
"type": "CPF",
"number": "12345678901"
},
"pix": {
"key": "12345678901"
}
},
"markup": {
"mode": "fixed",
"amount": 5.0
}
}
curl -X POST "https://api.sandbox.wepayout.com.br/v2/payout/payments" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"payment_method": "PIX",
"invoice": "e3317882-f821-455b-b082-dc3ba36e8a57",
"currency": "BRL",
"amount": 100.50,
"country": "BR",
"beneficiary": {
"name": "John Doe",
"document": {
"type": "CPF",
"number": "12345678901"
},
"pix": {
"key": "12345678901",
"key_type": "CPF"
}
},
"markup": {
"mode": "percent",
"amount": 2.5,
"min_charge_value": 0.50,
"max_charge_value": 10.00
}
}'
curl -X POST "https://api.sandbox.wepayout.com.br/v2/payout/payments" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"payment_method": "PIX",
"invoice": "e3317882-f821-455b-b082-dc3ba36e8a57",
"currency": "BRL",
"amount": 100.50,
"country": "BR",
"beneficiary": {
"name": "John Doe",
"document": {
"type": "CPF",
"number": "12345678901"
},
"pix": {
"key": "12345678901",
"key_type": "CPF"
}
},
"markup": {
"mode": "fixed",
"amount": 5.0
}
}'
Response
integer
WEpayment’s auto generated id, use this id to perform conciliation or perform queries via API / Dashboard.
object
string
Payment method used for the payout.Values:
PIXstring
The payout amount formatted with currency symbol.
string
Currency code (ISO 4217).
string
Invoice identifier.
object
Inline markup configuration applied to this payment.
Show Markup Object
Show Markup Object
{
"id": 12345,
"merchant": {
"id": 477,
"name": "Merchant Name"
},
"payment_method": "PIX",
"amount": "R$ 100,50",
"currency": "BRL",
"invoice": "e3317882-f821-455b-b082-dc3ba36e8a57",
"status": {
"id": 1,
"name": "Awaiting"
},
"beneficiary": {
"name": "John Doe",
"document": {
"type": "CPF",
"number": "12345678901"
}
},
"markup": {
"mode": "percent",
"amount": 2.5,
"min_charge_value": 0.50,
"max_charge_value": 10.00
},
"purpose": null,
"paid_at": null,
"created_at": "2024-01-15T10:30:00.000000Z",
"updated_at": "2024-01-15T10:30:00.000000Z"
}
{
"message": "The given data was invalid",
"errors": {
"markup": [
"Markup is only allowed for PIX payments"
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup.mode": [
"The selected markup.mode is invalid."
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup.amount": [
"The markup.amount must be at least 0.01."
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup.min_charge_value": [
"The markup.min_charge value field is required when markup.mode is percent."
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup.min_charge_value": [
"Invalid charge values for fixed mode"
]
}
}
{
"message": "The given data was invalid",
"errors": {
"markup": [
"Inline markup is required when no global markup is configured"
]
}
}
{
"message": "Internal error"
}
How It Works
- Priority: The inline markup configuration takes precedence over global and submerchant markup settings.
-
Calculation (for percent mode):
- The system calculates:
payment_amount * (amount / 100) - If calculated value <
min_charge_value→ appliesmin_charge_value - If calculated value >
max_charge_value→ appliesmax_charge_value - Otherwise → applies the calculated value
- The system calculates:
-
Fixed Mode: When using
fixedmode, the markup amount is applied directly regardless of the transaction value.
Related Resources
Create Payment
Complete documentation for creating payout payments
About Markup
Learn about markup types and configuration levels
Was this page helpful?
⌘I

