curl --request GET \
--url https://api.malga.io/v1/merchants/{merchantId}/platform-fee \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/merchants/{merchantId}/platform-fee', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.malga.io/v1/merchants/{merchantId}/platform-fee"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"platformFeeEnabled": true,
"rules": [
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000001",
"fixedAmount": 109,
"paymentMethod": "boleto",
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000002",
"percentage": 2.99,
"paymentMethod": "credit",
"installment": 1,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000003",
"percentage": 5.11,
"paymentMethod": "credit",
"installment": 2,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000004",
"percentage": 6.86,
"paymentMethod": "credit",
"installment": 3,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000005",
"percentage": 8.64,
"paymentMethod": "credit",
"installment": 4,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000006",
"percentage": 10.45,
"paymentMethod": "credit",
"installment": 5,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000007",
"percentage": 12.29,
"paymentMethod": "credit",
"installment": 6,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000008",
"percentage": 14.45,
"paymentMethod": "credit",
"installment": 7,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000009",
"percentage": 16.35,
"paymentMethod": "credit",
"installment": 8,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-00000000000a",
"percentage": 18.29,
"paymentMethod": "credit",
"installment": 9,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-00000000000b",
"percentage": 20.26,
"paymentMethod": "credit",
"installment": 10,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-00000000000c",
"percentage": 22.26,
"paymentMethod": "credit",
"installment": 11,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-00000000000d",
"percentage": 24.3,
"paymentMethod": "credit",
"installment": 12,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-00000000000e",
"percentage": 2,
"paymentMethod": "default",
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-00000000000f",
"percentage": 1.09,
"fixedAmount": 30,
"paymentMethod": "pix",
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
}
],
"simulation": {
"amount": 1000000,
"currency": "BRL"
},
"methods": [
{
"paymentMethod": "pix",
"accepted": true,
"source": "rule",
"percentage": 1.09,
"fixedAmount": 30,
"fee": 10930,
"sellerNet": 989070
},
{
"paymentMethod": "boleto",
"accepted": true,
"source": "rule",
"percentage": 0,
"fixedAmount": 109,
"fee": 109,
"sellerNet": 999891
},
{
"paymentMethod": "credit",
"accepted": true,
"installments": [
{
"installment": 1,
"accepted": true,
"source": "rule",
"percentage": 2.99,
"fixedAmount": 0,
"fee": 29900,
"sellerNet": 970100,
"buyerInstallmentAmount": 1000000
},
{
"installment": 2,
"accepted": true,
"source": "rule",
"percentage": 5.11,
"fixedAmount": 0,
"fee": 51100,
"sellerNet": 948900,
"buyerInstallmentAmount": 500000
},
{
"installment": 3,
"accepted": true,
"source": "rule",
"percentage": 6.86,
"fixedAmount": 0,
"fee": 68600,
"sellerNet": 931400,
"buyerInstallmentAmount": 333333
},
{
"installment": 4,
"accepted": true,
"source": "rule",
"percentage": 8.64,
"fixedAmount": 0,
"fee": 86400,
"sellerNet": 913600,
"buyerInstallmentAmount": 250000
},
{
"installment": 5,
"accepted": true,
"source": "rule",
"percentage": 10.45,
"fixedAmount": 0,
"fee": 104500,
"sellerNet": 895500,
"buyerInstallmentAmount": 200000
},
{
"installment": 6,
"accepted": true,
"source": "rule",
"percentage": 12.29,
"fixedAmount": 0,
"fee": 122900,
"sellerNet": 877100,
"buyerInstallmentAmount": 166666
},
{
"installment": 7,
"accepted": true,
"source": "rule",
"percentage": 14.45,
"fixedAmount": 0,
"fee": 144500,
"sellerNet": 855500,
"buyerInstallmentAmount": 142857
},
{
"installment": 8,
"accepted": true,
"source": "rule",
"percentage": 16.35,
"fixedAmount": 0,
"fee": 163500,
"sellerNet": 836500,
"buyerInstallmentAmount": 125000
},
{
"installment": 9,
"accepted": true,
"source": "rule",
"percentage": 18.29,
"fixedAmount": 0,
"fee": 182900,
"sellerNet": 817100,
"buyerInstallmentAmount": 111111
},
{
"installment": 10,
"accepted": true,
"source": "rule",
"percentage": 20.26,
"fixedAmount": 0,
"fee": 202600,
"sellerNet": 797400,
"buyerInstallmentAmount": 100000
},
{
"installment": 11,
"accepted": true,
"source": "rule",
"percentage": 22.26,
"fixedAmount": 0,
"fee": 222600,
"sellerNet": 777400,
"buyerInstallmentAmount": 90909
},
{
"installment": 12,
"accepted": true,
"source": "rule",
"percentage": 24.3,
"fixedAmount": 0,
"fee": 243000,
"sellerNet": 757000,
"buyerInstallmentAmount": 83333
},
{
"installment": 13,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 76923
},
{
"installment": 14,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 71428
},
{
"installment": 15,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 66666
},
{
"installment": 16,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 62500
},
{
"installment": 17,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 58823
},
{
"installment": 18,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 55555
},
{
"installment": 19,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 52631
},
{
"installment": 20,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 50000
},
{
"installment": 21,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 47619
},
{
"installment": 22,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 45454
},
{
"installment": 23,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 43478
},
{
"installment": 24,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 41666
}
]
}
],
"coverage": {
"merchant": {
"missing": [],
"warnings": [
"credit sem regra própria em 13x a 24x; a cobrança cai na regra genérica"
]
}
}
}Listar regras de platform fee
Retorna as regras gravadas da subconta e, quando simulationAmount é enviado, a taxa calculada por método de pagamento e, no cartão de crédito, por parcela.
rules: as regras como estão gravadas. No crédito, uma regra por parcela.simulation: o valor de venda usado nas contas em dinheiro. Só comsimulationAmount.methods: a taxa que a cobrança aplicaria em cada método. No crédito, a listainstallmentstraz sempre as 24 parcelas. Só comsimulationAmount.coverage: avisos sobre a configuração. Só comsimulationAmount.
Sem simulationAmount, a resposta traz apenas platformFeeEnabled e rules.
A taxa incide sobre o valor total da venda, e não sobre o valor de cada parcela: fee = floor(amount * percentage / 100) + fixedAmount, e sellerNet = amount - fee. Quando a taxa é maior ou igual ao valor simulado, a venda seria recusada, e o item vem com accepted: false e reason: fee_exceeds_amount.
Em cada parcela de crédito, source indica de onde vem a taxa: rule quando a parcela tem regra própria e default quando a cobrança usa a regra default.
curl --request GET \
--url https://api.malga.io/v1/merchants/{merchantId}/platform-fee \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/merchants/{merchantId}/platform-fee', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.malga.io/v1/merchants/{merchantId}/platform-fee"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"platformFeeEnabled": true,
"rules": [
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000001",
"fixedAmount": 109,
"paymentMethod": "boleto",
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000002",
"percentage": 2.99,
"paymentMethod": "credit",
"installment": 1,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000003",
"percentage": 5.11,
"paymentMethod": "credit",
"installment": 2,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000004",
"percentage": 6.86,
"paymentMethod": "credit",
"installment": 3,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000005",
"percentage": 8.64,
"paymentMethod": "credit",
"installment": 4,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000006",
"percentage": 10.45,
"paymentMethod": "credit",
"installment": 5,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000007",
"percentage": 12.29,
"paymentMethod": "credit",
"installment": 6,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000008",
"percentage": 14.45,
"paymentMethod": "credit",
"installment": 7,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-000000000009",
"percentage": 16.35,
"paymentMethod": "credit",
"installment": 8,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-00000000000a",
"percentage": 18.29,
"paymentMethod": "credit",
"installment": 9,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-00000000000b",
"percentage": 20.26,
"paymentMethod": "credit",
"installment": 10,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-00000000000c",
"percentage": 22.26,
"paymentMethod": "credit",
"installment": 11,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-00000000000d",
"percentage": 24.3,
"paymentMethod": "credit",
"installment": 12,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-00000000000e",
"percentage": 2,
"paymentMethod": "default",
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3f0a1c2e-6b1d-4c8e-9a7f-00000000000f",
"percentage": 1.09,
"fixedAmount": 30,
"paymentMethod": "pix",
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
}
],
"simulation": {
"amount": 1000000,
"currency": "BRL"
},
"methods": [
{
"paymentMethod": "pix",
"accepted": true,
"source": "rule",
"percentage": 1.09,
"fixedAmount": 30,
"fee": 10930,
"sellerNet": 989070
},
{
"paymentMethod": "boleto",
"accepted": true,
"source": "rule",
"percentage": 0,
"fixedAmount": 109,
"fee": 109,
"sellerNet": 999891
},
{
"paymentMethod": "credit",
"accepted": true,
"installments": [
{
"installment": 1,
"accepted": true,
"source": "rule",
"percentage": 2.99,
"fixedAmount": 0,
"fee": 29900,
"sellerNet": 970100,
"buyerInstallmentAmount": 1000000
},
{
"installment": 2,
"accepted": true,
"source": "rule",
"percentage": 5.11,
"fixedAmount": 0,
"fee": 51100,
"sellerNet": 948900,
"buyerInstallmentAmount": 500000
},
{
"installment": 3,
"accepted": true,
"source": "rule",
"percentage": 6.86,
"fixedAmount": 0,
"fee": 68600,
"sellerNet": 931400,
"buyerInstallmentAmount": 333333
},
{
"installment": 4,
"accepted": true,
"source": "rule",
"percentage": 8.64,
"fixedAmount": 0,
"fee": 86400,
"sellerNet": 913600,
"buyerInstallmentAmount": 250000
},
{
"installment": 5,
"accepted": true,
"source": "rule",
"percentage": 10.45,
"fixedAmount": 0,
"fee": 104500,
"sellerNet": 895500,
"buyerInstallmentAmount": 200000
},
{
"installment": 6,
"accepted": true,
"source": "rule",
"percentage": 12.29,
"fixedAmount": 0,
"fee": 122900,
"sellerNet": 877100,
"buyerInstallmentAmount": 166666
},
{
"installment": 7,
"accepted": true,
"source": "rule",
"percentage": 14.45,
"fixedAmount": 0,
"fee": 144500,
"sellerNet": 855500,
"buyerInstallmentAmount": 142857
},
{
"installment": 8,
"accepted": true,
"source": "rule",
"percentage": 16.35,
"fixedAmount": 0,
"fee": 163500,
"sellerNet": 836500,
"buyerInstallmentAmount": 125000
},
{
"installment": 9,
"accepted": true,
"source": "rule",
"percentage": 18.29,
"fixedAmount": 0,
"fee": 182900,
"sellerNet": 817100,
"buyerInstallmentAmount": 111111
},
{
"installment": 10,
"accepted": true,
"source": "rule",
"percentage": 20.26,
"fixedAmount": 0,
"fee": 202600,
"sellerNet": 797400,
"buyerInstallmentAmount": 100000
},
{
"installment": 11,
"accepted": true,
"source": "rule",
"percentage": 22.26,
"fixedAmount": 0,
"fee": 222600,
"sellerNet": 777400,
"buyerInstallmentAmount": 90909
},
{
"installment": 12,
"accepted": true,
"source": "rule",
"percentage": 24.3,
"fixedAmount": 0,
"fee": 243000,
"sellerNet": 757000,
"buyerInstallmentAmount": 83333
},
{
"installment": 13,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 76923
},
{
"installment": 14,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 71428
},
{
"installment": 15,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 66666
},
{
"installment": 16,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 62500
},
{
"installment": 17,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 58823
},
{
"installment": 18,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 55555
},
{
"installment": 19,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 52631
},
{
"installment": 20,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 50000
},
{
"installment": 21,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 47619
},
{
"installment": 22,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 45454
},
{
"installment": 23,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 43478
},
{
"installment": 24,
"accepted": true,
"source": "default",
"percentage": 2,
"fixedAmount": 0,
"fee": 20000,
"sellerNet": 980000,
"buyerInstallmentAmount": 41666
}
]
}
],
"coverage": {
"merchant": {
"missing": [],
"warnings": [
"credit sem regra própria em 13x a 24x; a cobrança cai na regra genérica"
]
}
}
}Path Parameters
Identificador do merchant
Query Parameters
Valor da venda simulada, em centavos, usado para calcular fee, sellerNet e buyerInstallmentAmount. Inteiro de 1 a 100000000000. Quando enviado, a resposta traz simulation, methods e coverage; quando omitido, traz apenas platformFeeEnabled e rules.
1 <= x <= 100000000000Response
Regras de platform fee, flag de ativação do merchant e taxa calculada por método e por parcela
Indica se o platform fee está ativo para o merchant
true
Regras de platform fee ativas cadastradas para o merchant. No crédito, uma regra por parcela.
Show child attributes
Show child attributes
Valor de venda usado nas contas em dinheiro de methods
Show child attributes
Show child attributes
Taxa calculada por método de pagamento, na ordem pix, boleto e credit.
Show child attributes
Show child attributes
Avisos sobre a configuração de platform fee
Show child attributes
Show child attributes
Was this page helpful?