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-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": 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": "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-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": 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": []
}
}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 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
Indica se o platform fee está ativo para o merchant
true
Regras de platform fee ativas da subconta. No crédito, uma regra por parcela. As regras de seller estão em sellerRules.
Show child attributes
Show child attributes
Sellers com ao menos uma regra própria ativa, ordenados por sellerId. Vazia quando nenhum seller tem regra própria.
Show child attributes
Show child attributes
Estado de cada método e parcela, e avisos sobre a configuração de platform fee
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
Was this page helpful?