Skip to main content
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
}
'
{
  "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"
}

Update Merchant Markup Configuration

Use this endpoint to update an existing markup configuration for a merchant, identified by its markupId.

Path Parameters

markupId
integer
required
Unique identifier of the markup configuration to be updated.

Request Body

mode
string
Markup mode to be applied.Allowed values:
  • fixed
  • percent
Business rules:
  • Required if you send any of these fields: amount, min_charge_value, max_charge_value.
amount
number
Markup value to be applied.Constraints:
  • Optional
  • Must be greater than or equal to 0.01
min_charge_value
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
max_charge_value
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
enabled
boolean
Flag to enable or disable this markup configuration.
  • Optional
  • Allowed values: true, false
Mode and range rules
  • If you send any of amount, min_charge_value or max_charge_value, you must also send mode.
  • When mode = fixed, you must not send min_charge_value or max_charge_value.
  • When mode = percent, you must send min_charge_value, and max_charge_value is optional but must be greater than or equal to min_charge_value when provided.
Special rule when changing modeIf you change the mode from percent to fixed, the service will internally reset:
  • min_charge_value = null
  • max_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
  }'

Response

id
integer
Markup configuration ID.
product
string
Product where the markup is applied (e.g., payin).
payment_method
string
Payment method where the markup is applied (e.g., pix).
account_id
integer
Merchant ID that receives the markup.
parent_id
integer or null
Parent relationship ID, when applicable.
type
string
Markup scope type. Example: global.
mode
string
Markup mode. Example: fixed or percent.
amount
number
Markup value configured for this rule.
min_charge_value
number or null
Minimum markup value when mode is percent.
max_charge_value
number or null
Maximum markup value when mode is percent.
enabled
boolean
Indicates whether the markup configuration is currently active.
created_at
string
Date and time when the markup configuration was created.
updated_at
string
Date and time when the markup configuration was last updated.
{
  "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"
}

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