Comunidade de Desenvolvedores maxiPago!

Serviço de Notificação (webhook)

O Webhooks é a prática de recebimento de informações de forma passiva através de uma URL http/https (Localizador padrão de recursos). Com o Webhooks da maxiPago! o recebimento será sobre status das transações.

ATENÇÃO:

A URL de recebimento das informações deve ser criada e enviada para a maxiPago! para cadastro.

A URL deve ter status 200 OK, qualquer status diferente impossibilitará o funcionamento do Webhooks.

Funcionamento

Para funcionamento do Webhooks, a URL de call-back deve ser criada e ficar online constantemente.

A maxiPago! faz o envio das informações utilizando uma comunicação http/https enviando um XML através do método POST com o Header “content-type: x-www-form-urlencoded”, portanto, a URL deve estar preparada para este tipo de requisição.

Abaixo, um modelo de XML de requisição que será enviado pela maxiPago!:

Header

Pragma: no-cache
User-agent:Java/1.7.0_79
Host:10.1.4.116:8080
Accept:text/html, image/gif, image/jpeg
Connection:keep-alive
Content-length:509

Tipos de Transações Reportadas

O Webhooks da maxiPago! envia informações para a URL cadastrada sobre os seguintes tipos de transações:

 

Body


Cartão de crédito (Captura)

xml=
<?xml version="1.0" encoding="UTF-8"?>
<Request>
    <transaction-event>
        <transactionStatus>3</transactionStatus>
        <transactionType>CreditCardSale</transactionType>
        <transactionID>501043</transactionID>
        <tid>1006993069000AC96D2A</tid>
        <orderID>7F000101:015DF791E89B:C66D:79BA05A3</orderID>
        <transactionState>Captured</transactionState>
        <transactionDate>08-19-2017 00:56:27</transactionDate>
        <nsu>310802</nsu>
        <merchantId>1501</merchantId>
        <transactionAmount>24.00</transactionAmount>
        <referenceNumber>20200001</referenceNumber>
    </transaction-event>

Cartão de crédito (Declinado)

</Request>
xml=undefined<?xml version="1.0" encoding="UTF-8"?>undefined<Request>
<transaction-event>
    <transactionStatus>7</transactionStatus>
    <transactionType>CreditCardSale</transactionType>
    <transactionID>501043</transactionID>
    <tid>1006993069000AC96D2A</tid>
    <orderID>7F000101:015DF791E89B:C66D:79BA05A3</orderID>
    <transactionState>Declined</transactionState>
    <transactionDate>08-19-2017 00:56:27</transactionDate>
    <nsu>310802</nsu>
    <merchantId>1501</merchantId>
    <transactionAmount>24.00</transactionAmount>
    <referenceNumber>20200001</referenceNumber>
</transaction-event>

Cartão de crédito (Cancelamento)

undefined</Request>
xml=undefined<?xml version="1.0" encoding="UTF-8"?>undefined<Request>
<transaction-event>
    <transactionStatus>9</transactionStatus>
    <transactionType>CreditCardSale</transactionType>
    <transactionID>501043</transactionID>
    <tid>1006993069000AC96D2A</tid>
    <orderID>7F000101:015DF791E89B:C66D:79BA05A3</orderID>
    <transactionState>Voided</transactionState>
    <transactionDate>08-19-2017 00:56:27</transactionDate>
    <nsu>310802</nsu>
    <merchantId>1501</merchantId>
    <transactionAmount>24.00</transactionAmount>
    <referenceNumber>20200001</referenceNumber>
</transaction-event>undefined</Request>

Boleto Bancário (visualizado)

xml=
<?xml version="1.0" encoding="UTF-8"?>
<Request>
    <transaction-event>
        <transactionStatus>34</transactionStatus>
        <transactionType>30</transactionType>
        <transactionID>501043</transactionID>
        <orderID>7F000101:015DF791E89B:C66D:79BA05A3</orderID>
        <transactionState>Viewed</transactionState>
        <transactionDate>08-19-2017 00:56:27</transactionDate>
        <merchantId>1501</merchantId>
        <transactionAmount>24.00</transactionAmount>
        <referenceNumber>20200001</referenceNumber>
    </transaction-event>

Boleto Bancário (pago)

undefined</Request>
xml=undefined<?xml version="1.0" encoding="UTF-8"?>undefined<Request>
<transaction-event>
    <transactionStatus>10</transactionStatus>
    <transactionType>30</transactionType>
    <transactionID>501043</transactionID>
    <orderID>7F000101:015DF791E89B:C66D:79BA05A3</orderID>
    <transactionState>Settled</transactionState>
    <transactionDate>08-19-2017 00:56:27</transactionDate>
    <merchantId>1501</merchantId>
    <transactionAmount>24.00</transactionAmount>
    <referenceNumber>20200001</referenceNumber>
</transaction-event>

Estorno (acatado)

xml=<?xml version="1.0" encoding="UTF-8"?>
<Request>
    <transaction-event>
        <transactionStatus>3</transactionStatus>
        <transactionType>Creditcardreturn</transactionType>
        <transactionID>501043</transactionID>
        <tid>1006993069000AC96D2A</tid>
        <orderID>7F000101:015DF791E89B:C66D:79BA05A3</orderID>
        <transactionState>Captured</transactionState>
        <transactionDate>08-19-2017 00:56:27</transactionDate>
        <nsu>310802</nsu>
        <merchantId>1501</merchantId>
        <transactionAmount>24.00</transactionAmount>
        <referenceNumber>20200001</referenceNumber>
    </transaction-event>
</Request>

Recorrêcia (operação acatada)

xml=<?xml version="1.0" encoding="UTF-8"?>
<Request>
    <transaction-event>
        <transactionStatus>3</transactionStatus>
        <transactionType>CreditCardSale</transactionType>
        <transactionID>501043</transactionID>
        <tid>1006993069000AC96D2A</tid>
        <orderID>7F000101:015DF791E89B:C66D:79BA05A3</orderID>
        <transactionState>Captured</transactionState>
        <transactionDate>08-19-2017 00:56:27</transactionDate>
        <nsu>310802</nsu>
        <merchantId>1501</merchantId>
        <transactionAmount>24.00</transactionAmount>
        <recurringFlag>Y</recurringFlag>
        <referenceNumber>20200001</referenceNumber>
    </transaction-event>

Recorrêcia (operação declinada)

xml=<?xml version="1.0" encoding="UTF-8"?>
<Request>
    <transaction-event>
        <transactionStatus>7</transactionStatus>
        <transactionType>CreditCardSale</transactionType>
        <transactionID>501043</transactionID>
        <tid>1006993069000AC96D2A</tid>
        <orderID>7F000101:015DF791E89B:C66D:79BA05A3</orderID>
        <transactionState>Declined</transactionState>
        <transactionDate>08-19-2017 00:56:27</transactionDate>
        <nsu>310802</nsu>
        <merchantId>1501</merchantId>
        <transactionAmount>24.00</transactionAmount>
        <recurringFlag>Y</recurringFlag>
        <referenceNumber>20200001</referenceNumber>
    </transaction-event>
</Request>

Fraude (aprovada)

xml=<?xml version="1.0" encoding="UTF-8"?>
<Request>
    <transaction-event>
        <transactionStatus>44</transactionStatus>
        <transactionType>CreditCardSale</transactionType>
        <transactionID>501043</transactionID>
        <tid>1006993069000AC96D2A</tid>
        <orderID>7F000101:015DF791E89B:C66D:79BA05A3</orderID>
        <transactionState>Fraud Approved</transactionState>
        <transactionDate>08-19-2017 00:56:27</transactionDate>
        <nsu>310802</nsu>
        <merchantId>1501</merchantId>
        <transactionAmount>24.00</transactionAmount>
        <referenceNumber>20200001</referenceNumber>
    </transaction-event>

Fraude (declinada)

<Request>
    <transaction-event>
        <transactionStatus>45</transactionStatus>
        <transactionType>CreditCardSale</transactionType>
        <transactionID>501043</transactionID>
        <tid>1006993069000AC96D2A</tid>
        <orderID>7F000101:015DF791E89B:C66D:79BA05A3</orderID>
        <transactionState>Fraud Declined</transactionState>
        <transactionDate>08-19-2017 00:56:27</transactionDate>
        <nsu>310802</nsu>
        <merchantId>1501</merchantId>
        <transactionAmount>24.00</transactionAmount>
        <referenceNumber>20200001</referenceNumber>
    </transaction-event>
</Request>

Autenticação 3DS (autenticação iniciada)

<Request>
    <transaction-event>
        <transactionStatus>32</transactionStatus>
        <transactionType>Autenticated</transactionType>
        <transactionID>501043</transactionID>
        <tid>1006993069000AC96D2A</tid>
        <orderID>7F000101:015DF791E89B:C66D:79BA05A3</orderID>
        <transactionState>Authentication Started</transactionState>
        <transactionDate>08-19-2017 00:56:27</transactionDate>
        <nsu>310802</nsu>
        <merchantId>1501</merchantId>
        <transactionAmount>24.00</transactionAmount>
        <referenceNumber>20200001</referenceNumber>
    </transaction-event>
</Request>

Autenticação 3DS (autenticação acatada com sucesso)

<Request>
    <transaction-event>
        <transactionStatus>32</transactionStatus>
        <transactionType>Autenticated</transactionType>
        <transactionID>501043</transactionID>
        <tid>1006993069000AC96D2A</tid>
        <orderID>7F000101:015DF791E89B:C66D:79BA05A3</orderID>
        <transactionState>Authentication Started</transactionState>
        <transactionDate>08-19-2017 00:56:27</transactionDate>
        <nsu>310802</nsu>
        <merchantId>1501</merchantId>
        <transactionAmount>24.00</transactionAmount>
        <referenceNumber>20200001</referenceNumber>
    </transaction-event>
</Request>

Autenticação 3DS (autenticação concluída)

xml=<?xml version="1.0" encoding="UTF-8"?>
<Request>
    <transaction-event>
        <transactionStatus>30</transactionStatus>
        <transactionType>Autenticated</transactionType>
        <transactionID>501043</transactionID>
        <tid>1006993069000AC96D2A</tid>
        <orderID>7F000101:015DF791E89B:C66D:79BA05A3</orderID>
        <transactionState>Authenticated</transactionState>
        <transactionDate>08-19-2017 00:56:27</transactionDate>
        <nsu>310802</nsu>
        <merchantId>1501</merchantId>
        <transactionAmount>24.00</transactionAmount>
        <referenceNumber>20200001</referenceNumber>
    </transaction-event>
</Request>

Pix

xml=<?xml version="1.0" encoding="UTF-8"?>
<Request>
    <transaction-event>
        <transactionStatus>3</transactionStatus>
        <transactionType>PixSale</transactionType>
        <orderID>0A01049C:017D4824A517:6280:5556432E</orderID>
        <transactionState>Captured</transactionState>
        <transactionDate>08-19-2017 00:56:27</transactionDate>        
        <merchantId>1501</merchantId>
        <transactionAmount>24.00</transactionAmount>
        <referenceNumber>20200001</referenceNumber>
    </transaction-event>
</Request>

Tabela de Parâmetros Enviados: