Skip to main content
POST
Create Payin with Global Markup

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 submerchant’s own markup or, if there is none, the global markup configuration.

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 a markup configuration, first for the submerchant and then for the merchant, based on:
    • account_id (submerchant ID)
    • product (payin)
    • payment_method (pix, boleto, etc.)
  3. Application: If the submerchant has its own markup for the payment method, it is applied to the charge. Otherwise, the global markup is applied.
  4. Priority: If you send an inline markup object, it takes precedence over the submerchant and global markups.

Request Examples

Response

integer
WEpayment’s auto generated id, use this id to perform conciliation or perform queries via API / Dashboard.
object
Merchant object.
string
WEpayments auto generated hash, use this hash to send your user to the payment page.
string
The WEpayments payment page is the place where you will redirect the end customer to pay the bill.
string
Your identification number.
string
Payment method that will be used in payin.Values: pix, boleto
integer
The payin total amount in cents.
object
Currency object.
string
Current status of the payin.Example: pending
object
Markup configuration applied to this charge (submerchant or global).

Business Rules

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

Error Scenarios

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

If the submerchant has enable_markup = true but:
  • No submerchant markup configuration exists for the payment method
  • No global markup configuration exists for the payment method
  • 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.”

Create Payin with Inline Markup

Learn how to create payin with inline markup

Create Merchant Markup

Configure global markup for merchants

About Markup

Understand markup types and configuration levels

Create Charge

Complete documentation for creating payin charges