Skip to main content
POST
https://api.sandbox.wepayout.com.br
/
v2
/
payin
/
payments
Create Payin with Inline Markup
curl --request POST \
  --url https://api.sandbox.wepayout.com.br/v2/payin/payments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "markup": {
    "mode": "<string>",
    "amount": 123,
    "min_charge_value": 123,
    "max_charge_value": 123
  }
}
'
{
  "id": 51687,
  "merchant": {
    "id": 477,
    "name": "Merchant Name"
  },
  "hash": "abc123def456",
  "payment_page": "https://payment.wepayments.com.br/abc123def456",
  "invoice": "YOUR-CODE1234",
  "payment_method": "pix",
  "amount": 10000,
  "currency": {
    "id": 1,
    "code": "BRL"
  },
  "status": "pending",
  "markup": {
    "mode": "percent",
    "amount": 2.5,
    "min_charge_value": 0.50,
    "max_charge_value": 10.00
  }
}
Coming Soon: This feature will be available soon. Stay tuned for updates!

Business Rules

Important Restrictions:
  • This feature launches in January 2026

Create Payin with Inline Markup

When creating a payin charge, you can include an inline markup object in the request payload.
Inline markup takes precedence: If you send a markup object in the charge creation request, it will override any global or submerchant markup configurations.

Markup Object Structure

The markup object should be added to the request body when creating a charge via POST /v2/payin/payments.
markup
object
Optional inline markup configuration for this specific charge.
When mode is fixed, do not send min_charge_value or max_charge_value.

Request Examples

{
  "payment_method": "pix",
  "invoice": "YOUR-CODE1234",
  "currency": "BRL",
  "amount": 10000,
  "country": "BR",
  "buyer": {
    "name": "Buyer Name",
    "document": {
      "type": "CPF",
      "number": "34960826312"
    },
    "email": "[email protected]"
  },
  "pix": {
    "expire_date": "2025-12-31T23:59:59"
  },
  "markup": {
    "mode": "percent",
    "amount": 2.5,
    "min_charge_value": 0.50,
    "max_charge_value": 10.00
  }
}

Response

id
integer
WEpayment’s auto generated id, use this id to perform conciliation or perform queries via API / Dashboard.
merchant
object
Merchant object.
hash
string
WEpayments auto generated hash, use this hash to send your user to the payment page.
payment_page
string
The WEpayments payment page is the place where you will redirect the end customer to pay the bill.
invoice
string
Your identification number.
payment_method
string
Payment method that will be used in payin.Values: pix, boleto
amount
integer
The payin total amount in cents.
currency
object
Currency object.
status
string
Current status of the payin.Example: pending
markup
object
Inline markup configuration applied to this charge.
{
  "id": 51687,
  "merchant": {
    "id": 477,
    "name": "Merchant Name"
  },
  "hash": "abc123def456",
  "payment_page": "https://payment.wepayments.com.br/abc123def456",
  "invoice": "YOUR-CODE1234",
  "payment_method": "pix",
  "amount": 10000,
  "currency": {
    "id": 1,
    "code": "BRL"
  },
  "status": "pending",
  "markup": {
    "mode": "percent",
    "amount": 2.5,
    "min_charge_value": 0.50,
    "max_charge_value": 10.00
  }
}

How It Works

  1. Priority: The inline markup configuration takes precedence over global and submerchant markup settings.
  2. Calculation (for percent mode):
    • The system converts the markup amount to percentage: amount * 100 = percentage%
    • Then calculates: transaction_amount * (amount)
    • If calculated value < min_charge_value → applies min_charge_value
    • If calculated value > max_charge_value → applies max_charge_value
    • Otherwise → applies the calculated value
  3. Fixed Mode: When using fixed mode, the markup amount is applied directly regardless of the transaction value.