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": "1419b085-587e-4405-9e43-ae7bd7f7dc8f",
"fixedAmount": 109,
"paymentMethod": "boleto",
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "8a01e521-7f03-4cac-a260-f64ed041e791",
"percentage": 2.99,
"paymentMethod": "credit",
"installment": 1,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "5158ef9e-2395-424c-85d0-ba27e28f1c22",
"percentage": 5.11,
"paymentMethod": "credit",
"installment": 2,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "6a0d8a2a-d8dd-4706-a60a-ee40dcb16ad0",
"percentage": 6.86,
"paymentMethod": "credit",
"installment": 3,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "347fcfa5-2952-4439-ac78-7ee5a05d0d7c",
"percentage": 8.64,
"paymentMethod": "credit",
"installment": 4,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "976eec9d-1465-4444-8d0d-a0ccb9d3512d",
"percentage": 10.45,
"paymentMethod": "credit",
"installment": 5,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "825a4946-ea41-48f3-b6a8-727bac729e6a",
"percentage": 12.29,
"paymentMethod": "credit",
"installment": 6,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "6ee890ec-9c39-432e-9942-146644718866",
"percentage": 14.45,
"paymentMethod": "credit",
"installment": 7,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "22edcf82-e654-4801-9752-88370a49dc39",
"percentage": 16.35,
"paymentMethod": "credit",
"installment": 8,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "63e917e7-5c32-4ef0-a831-6139de2f17df",
"percentage": 18.29,
"paymentMethod": "credit",
"installment": 9,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "366f0fce-5631-4a65-ac3f-76300a4b394e",
"percentage": 20.26,
"paymentMethod": "credit",
"installment": 10,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "1739f508-3246-48d1-86b9-d31d623f403a",
"percentage": 22.26,
"paymentMethod": "credit",
"installment": 11,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3bc3d2ca-c81f-4721-917f-4d4e06b8b27a",
"percentage": 24.3,
"paymentMethod": "credit",
"installment": 12,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "2d4537e2-4c99-46b6-9c85-2b9309de93d3",
"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": false,
"reason": "no_rule_configured"
},
{
"installment": 14,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 15,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 16,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 17,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 18,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 19,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 20,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 21,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 22,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 23,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 24,
"accepted": false,
"reason": "no_rule_configured"
}
]
}
],
"sellerRules": [],
"coverage": {
"merchant": {
"missing": [],
"warnings": [
"credit sem regra em 13x a 24x; com a taxa ligada, a venda é recusada por falta de regra"
],
"methods": [
{
"paymentMethod": "pix",
"state": "own"
},
{
"paymentMethod": "boleto",
"state": "own"
},
{
"paymentMethod": "credit",
"installments": [
{
"from": 1,
"to": 12,
"state": "own"
},
{
"from": 13,
"to": 24,
"state": "missing"
}
]
}
]
},
"sellers": []
}
}Listar regras de platform fee
Retorna as regras gravadas da subconta e dos sellers dela, o estado de cada método e parcela e, quando simulationAmount é enviado, a taxa calculada por método de pagamento e, no cartão de crédito, por parcela.
rules: as regras da subconta como estão gravadas. No crédito, uma regra por parcela. As regras de seller não entram aqui.sellerRules: um item por seller com ao menos uma regra própria ativa, ordenados porsellerId, cada um com as regras dele no mesmo formato derules.coverage: o estado depix,boletoe de cada parcela decredit, para a subconta emcoverage.merchante para cada seller desellerRulesemcoverage.sellers, mais avisos em texto.simulation: o valor de venda usado nas contas em dinheiro. Só comsimulationAmount.methods: a taxa que a cobrança aplicaria em cada método com a regra da subconta. No crédito, a listainstallmentstraz sempre as 24 parcelas. Só comsimulationAmount.sellerRules[].methods: a mesma conta para cada seller, como se ele recebesse o valor simulado inteiro, comscopedizendo se vale a regra dele ou a da subconta. Só comsimulationAmount.
platformFeeEnabled, rules, sellerRules e coverage vêm sempre. simulation, methods e sellerRules[].methods só vêm com simulationAmount.
Estados de coverage:
| Estado | Significado |
|---|---|
own | Regra própria que cobra algo |
exempt | Regra própria com percentage: 0 e fixedAmount: 0 |
inherits | Só em seller. Sem regra própria, segue a regra da subconta |
missing | Sem regra em nenhum nível. Com a platform fee ligada, a venda é recusada com platform_fee_rule_not_configured |
Um seller sem regra própria num método ou parcela em que a subconta está em missing também aparece como missing, e não como inherits.
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.
source é sempre rule: a taxa vem da regra cadastrada para o método ou a parcela. No crédito, sem regra para a parcela, vale a regra de crédito sem installment da subconta, quando ela existe. Essa regra vem da conversão da antiga regra default e não é criada pela API. Sem nenhuma regra, o método ou a parcela vem com accepted: false, reason: no_rule_configured e sem os campos de taxa.
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": "1419b085-587e-4405-9e43-ae7bd7f7dc8f",
"fixedAmount": 109,
"paymentMethod": "boleto",
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "8a01e521-7f03-4cac-a260-f64ed041e791",
"percentage": 2.99,
"paymentMethod": "credit",
"installment": 1,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "5158ef9e-2395-424c-85d0-ba27e28f1c22",
"percentage": 5.11,
"paymentMethod": "credit",
"installment": 2,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "6a0d8a2a-d8dd-4706-a60a-ee40dcb16ad0",
"percentage": 6.86,
"paymentMethod": "credit",
"installment": 3,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "347fcfa5-2952-4439-ac78-7ee5a05d0d7c",
"percentage": 8.64,
"paymentMethod": "credit",
"installment": 4,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "976eec9d-1465-4444-8d0d-a0ccb9d3512d",
"percentage": 10.45,
"paymentMethod": "credit",
"installment": 5,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "825a4946-ea41-48f3-b6a8-727bac729e6a",
"percentage": 12.29,
"paymentMethod": "credit",
"installment": 6,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "6ee890ec-9c39-432e-9942-146644718866",
"percentage": 14.45,
"paymentMethod": "credit",
"installment": 7,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "22edcf82-e654-4801-9752-88370a49dc39",
"percentage": 16.35,
"paymentMethod": "credit",
"installment": 8,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "63e917e7-5c32-4ef0-a831-6139de2f17df",
"percentage": 18.29,
"paymentMethod": "credit",
"installment": 9,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "366f0fce-5631-4a65-ac3f-76300a4b394e",
"percentage": 20.26,
"paymentMethod": "credit",
"installment": 10,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "1739f508-3246-48d1-86b9-d31d623f403a",
"percentage": 22.26,
"paymentMethod": "credit",
"installment": 11,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "3bc3d2ca-c81f-4721-917f-4d4e06b8b27a",
"percentage": 24.3,
"paymentMethod": "credit",
"installment": 12,
"createdAt": "2026-09-15T14:02:11.004Z",
"updatedAt": "2026-09-15T14:02:11.004Z"
},
{
"id": "2d4537e2-4c99-46b6-9c85-2b9309de93d3",
"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": false,
"reason": "no_rule_configured"
},
{
"installment": 14,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 15,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 16,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 17,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 18,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 19,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 20,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 21,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 22,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 23,
"accepted": false,
"reason": "no_rule_configured"
},
{
"installment": 24,
"accepted": false,
"reason": "no_rule_configured"
}
]
}
],
"sellerRules": [],
"coverage": {
"merchant": {
"missing": [],
"warnings": [
"credit sem regra em 13x a 24x; com a taxa ligada, a venda é recusada por falta de regra"
],
"methods": [
{
"paymentMethod": "pix",
"state": "own"
},
{
"paymentMethod": "boleto",
"state": "own"
},
{
"paymentMethod": "credit",
"installments": [
{
"from": 1,
"to": 12,
"state": "own"
},
{
"from": 13,
"to": 24,
"state": "missing"
}
]
}
]
},
"sellers": []
}
}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 também simulation, methods e sellerRules[].methods, e coverage passa a incluir os avisos que dependem do valor.
1 <= x <= 100000000000Response
Regras de platform fee, flag de ativação do merchant e taxa calculada por método e por parcela
Was this page helpful?