Merchant Advice Code (MAC) – Mastercard

O Merchant Advice Code (MAC) é um código retornado pela Mastercard em transações negadas ou em outros cenários específicos, como casos envolvendo cartões virtuais, atualização de dados do cartão (ABU) ou requisitos de token. Ele complementa o código de retorno da transação (Provider.ReturnCode) e orienta a loja sobre qual ação deve ser tomada:

  • Retentar a transação;
  • Aguardar um intervalo mínimo;
  • ou não retentar, conforme o cenário identificado pela bandeira.

Na resposta da API, o MAC é retornado no campo Payment.MerchantAdviceCode.

Como interpretar o MAC

Para interpretar o MAC em uma transação negada:

  1. Localize o motivo da negativa no campo Provider.ReturnCode. Consulte a tabela ABECS Mastercard para entender o motivo principal da recusa;
  2. Verifique o campo Payment.MerchantAdviceCode;
  3. Consulte a tabela de MACs da Mastercard para entender a instrução associada ao código.

Essa tabela é uma referência da própria bandeira Mastercard.

Siga exatamente a instrução da tabela, pois cada código MAC representa uma instrução específica.

Exemplo de retorno

{
  "MerchantOrderId": "2017051001",
  "Customer": {
    "Name": "Aline de Souza",
    "Identity": "12345678909",
    "IdentityType": "CPF",
    "Birthdate": "1990-01-01",
    },
  "Payment": {
    "Installments": 1,
    "Interest": "ByMerchant",
    "Capture": true,
    "Authenticate": false,
    "Recurrent": false,
    "CreditCard": {
      "CardNumber": "4091688625337641",
      "Holder": "Aline de Souza",
      "ExpirationDate": "12/2035",
      "SaveCard": false,
      "Alias": "",
      "Brand": "Master",
      "CardOnFile": {
        "Usage": "Used",
        "Reason": "Unscheduled"
      },
      "PaymentAccountReference": "V4V22OFIXRHCW7XV0GMY7CRCRPO8W"
    },
    "ProofOfSale": "202998",
    "AcquirerTransactionId": "0302052145676",
    "AuthorizationCode": "020473",
    "SoftDescriptor": "Mensagem",
    "SentOrderId": "2026030217214512641B",
    "DoSplit": false,
    "InitiatedTransactionIndicator": {
      "Category": "C1",
      "Subcategory": "StandingOrder"
    },
    "PaymentId": "7bbe8d82-53a2-466a-96d2-ad430463e85d",
    "Type": "CreditCard",
    "Amount": 10000,
    "ReceivedDate": "2026-03-02 17:21:45",
    "CapturedAmount": 10000,
    "CapturedDate": "2026-03-02 17:21:45",
    "Currency": "BRL",
    "Country": "BRA",
    "Provider": "Simulado",
    "Status": 3,
    "ProviderReturnCode": "51",
    "ProviderReturnMessage": "Autorização negada",
    "MerchantAdviceCode": "25",
    "Links": [
      {
        "Method": "GET",
        "Rel": "self",
        "Href": "https://apiquerysandbox.braspag.com.br/v2/sales/7bbe8d82-53a2-466a-96d2-ad430463e85d"
      },
      {
        "Method": "PUT",
        "Rel": "void",
        "Href": "https://apisandbox.braspag.com.br/v2/sales/7bbe8d82-53a2-466a-96d2-ad430463e85d/void"
      }
    ]
  }
}
{
  "MerchantOrderId": "202301131052",
  "Customer": {
    "Name": "Aline De Souza",
    "Identity": "12345678909",
    "IdentityType": "CPF",
    "Birthdate": "1990-01-01",
  },
  "Payment": {
    "DebitCard": {
      "CardNumber": "4091688625337641",
      "Holder": "Aline De Souza",
      "ExpirationDate": "12/2035",
      "SaveCard": false,
      "Brand": "Master",
      "CardOnFile": {
        "Usage": "Used",
        "Reason": "Unscheduled"
      },
      "PaymentAccountReference": "4V7UH7991DTGTLSJGE7O9KFYBNXJI"
    },
    "Capture": true,
    "Authenticate": true,
    "Recurrent": false,
    "ReturnUrl": "https://braspag.com.br",
    "ProofOfSale": "118534",
    "AcquirerTransactionId": "0302052837650",
    "AuthorizationCode": "615852",
    "SentOrderId": "202301131052",
    "ExternalAuthentication": {
      "Cavv": "AAABB2gHA1B5EFNjWQcDAAAAAAB=",
      "Xid": "Uk5ZanBHcWw2RjRCbEN5dGtiMTB=",
      "Eci": "5",
      "Version": "2",
      "ReferenceId": "a24a5d87-b1a1-4aef-a37b-2f30b91274e6"
    },
    "InitiatedTransactionIndicator": {
      "Category": "C1",
      "Subcategory": "StandingOrder"
    },
    "PaymentId": "850f0efd-bda4-438d-9486-96e5fb040184",
    "Type": "DebitCard",
    "Amount": 10000,
    "ReceivedDate": "2026-03-02 17:28:37",
    "CapturedAmount": 10000,
    "CapturedDate": "2026-03-02 17:28:37",
    "Currency": "BRL",
    "Country": "BRA",
    "Provider": "Simulado",
    "Status": 3,
    "ProviderReturnCode": "51",
    "ProviderReturnMessage": "Autorização negada",
    "MerchantAdviceCode": "25",
    "Links": [
      {
        "Method": "GET",
        "Rel": "self",
        "Href": "https://apiquerysandbox.braspag.com.br/v2/sales/850f0efd-bda4-438d-9486-96e5fb040184"
      },
      {
        "Method": "PUT",
        "Rel": "void",
        "Href": "https://apisandbox.braspag.com.br/v2/sales/850f0efd-bda4-438d-9486-96e5fb040184/void"
      }
    ]
  }
}