Skip to main content
POST
https://api.sandbox.wepayout.com.br
/
v2
/
payin
/
payments
Create Payin with Global Markup
curl --request POST \
  --url https://api.sandbox.wepayout.com.br/v2/payin/payments \
  --header 'Authorization: Bearer <token>'
{
  "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 Global Markup

When creating a payin charge, you can use the global markup configuration that has been set up for your merchant. With global markup, you do not need to send the markup object in the request payload.
Global markup is applied automatically: If the merchant has the markup feature enabled (enable_markup = true), the system will automatically search for and apply the global markup configuration for the submerchant.

How It Works

  1. Validation: The system checks if the enable_markup flag is active for the submerchant.
  2. Markup Search: If enabled, the system automatically searches for the global markup configuration based on:
    • account_id (submerchant ID)
    • product (payin)
    • payment_method (pix, boleto, etc.)
  3. Application: If a global markup is found, it is automatically applied to the charge.
  4. Priority: If you send an inline markup object, it takes precedence over the global markup.

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"
  }
}

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
Global 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
  }
}

Business Rules

Markup Required: If enable_markup = true for the submerchant and there is no global markup configuration, you must send an inline markup object. Otherwise, the request will fail with a 422 error.
Automatic Application: When enable_markup = true and a global markup exists, it is automatically applied without requiring the markup object in the request.

Error Scenarios

Scenario 1: enable_markup = true, No Global Markup, No Inline Markup

If the submerchant has enable_markup = true but:
  • No global markup configuration exists
  • No inline markup object is sent in the request
Result: Returns 422 error with message “O campo markup é obrigatório.”

Scenario 2: Error Verifying Global Markup

If there is an error while searching for or verifying the global markup configuration. Result: Returns 422 error with message “Error verifying markup configuration. Please try again or contact support.”