Comunidade de Desenvolvedores maxiPago!

3DS 2.0 – Cartão de Débito e Crédito

Cartão de Débito e Cartão de Crédito

– Compra autenticada pelo banco emissor.
– Permite ao lojista habilitar a função cartão de débito como meio de pagamento.
– Mais segurança para suas transações, cartão de débito e crédito.
– Elimina o chargeback para o lojista (liability shift).
– Cartão de Débito: liquidação D+2, MDR mais barato e sem chargeback.

Observação: Um dos grandes diferenciais desta versão é de que o a janela de autenticação do banco emissor não será exibida, no entanto é importante salientar que essa é uma premissa do banco; não cabendo ao gateway ser esse tomador de decisão. Em caso de retorno da URL retornada na requisição de 3DSecure pode ser aberta em lightbox com as dimensões de 400×400

3Ds 2.0 – Cartão de crédito e débito – URLs Para Envio dos Dados


SANDBOX
: https://testapi.maxipago.net/UniversalAPI/postXML
PRODUÇÃO: https://api.maxipago.net/UniversalAPI/postXML

Cenário de Testes (Sandbox)

No ambiente de testes é possível simular a maioria das requisições e transações:

Cartões para Testes e Cenários (Sandbox)

3DS Fingerprint (Sale) – Exemplo de Requisição

Transação com 3DS 2.0

Para poder efetuar pagamentos via 3DS 2.0, o lojista deverá informar a maxiPago!, solicitar a ativação do serviço através da equipe suporte via e-mail (suporte@maxipago.com) e também informar a URL de call-back (URL para a qual a maxiPago! enviará as alterações de status das transações).  A estrutura das transações de 3DS 2.0 estão descritas abaixo:

Exemplo de Requisição Cenário Frictionless

O que caracteriza Credit é o tipo de cartão creditCard. Segue a requisição de exemplo:

<transaction-request>
	<version>3.1.1.15</version>
	<verification>
		<merchantId>{{merchantId}}</merchantId>
		<merchantKey>{{merchantKey}}</merchantKey>
	</verification>
	<order>
		<sale>
			<processorID>xx</processorID>
			<fraudCheck>N</fraudCheck>
			<authentication>
				<mpiProcessorID>xxxx</mpiProcessorID>
				<onFailure>decline</onFailure>
			</authentication>
			<referenceNum>Order-001</referenceNum>
			<ipAddress>127.0.0.1</ipAddress>
			<billing>
				<id>0</id>
				<name>Fulano</name>
				<address>Rua Pedro Luiz</address>
				<address2>Casa</address2>
				<city>Guarulhos</city>
				<state>SP</state>
				<postalcode>07151-385</postalcode>
				<country>Brasil</country>
				<phone>(11) 96478-0977</phone>
				<email>Fulano.silva@maxipago.com</email>
			</billing>
			<shipping>
				<id>0</id>
				<name>Fulano</name>
				<address>Rua Pedro Luiz</address>
				<address2>, Casa</address2>
				<city>Guarulhos</city>
				<state>SP</state>
				<postalcode>, 00000-000</postalcode>
				<country>Brasil</country>
				<phone>(11) 96478-0323</phone>
				<email>Fulano.shin@maxipago.com</email>
			</shipping>
			<transactionDetail>
				<payType>
					<creditCard>
						<number>5221834791042066</number>
						<expMonth>12</expMonth>
						<expYear>2030</expYear>
						<cvvNumber>999</cvvNumber>
					</creditCard>
				</payType>
			</transactionDetail>
			<payment>
				<currencyCode>BRL</currencyCode>
				<productType>Service</productType>
				<chargeTotal>9.00</chargeTotal>
			</payment>
			<device>
				<colorDepth>1</colorDepth>
				<deviceType3ds>BROWSER</deviceType3ds>
				<javaEnabled>true</javaEnabled>
				<language>BR</language>
				<screenHeight>550</screenHeight>
				<screenWidth>550</screenWidth>
				<timeZoneOffset>3</timeZoneOffset>
			</device>
			<customerIdExt>888.058.830-34</customerIdExt>
			<userAgent>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36</userAgent>
		</sale>
		<clientData>
			<comments>JavaPlugin v1.1</comments>
		</clientData>
		<comments>JavaPlugin v1.1</comments>
	</clientData>
</order>
</transaction-request>

Exemplo de Retorno Frictionless

<?xml version="1.0" encoding="UTF-8"?>
<transaction-response>
	<authCode>123456</authCode>
	<orderID>AC143C39:016AE9944D4F:B2BB:40E797DD</orderID>
	<referenceNum>Order-001</referenceNum>
	<transactionID>709188</transactionID>
	<transactionTimestamp>1558722089</transactionTimestamp>
	<responseCode>0</responseCode>
	<responseMessage>CAPTURED</responseMessage>
	<avsResponseCode>YYY</avsResponseCode>
	<cvvResponseCode>M</cvvResponseCode>
	<processorCode>A</processorCode>
	<processorMessage>APPROVED</processorMessage>
	<processorName>SIMULATOR</processorName>
	<creditCardBin>482481</creditCardBin>
	<creditCardLast4>0008</creditCardLast4>
	<errorMessage/>
	<processorTransactionID>120914</processorTransactionID>
	<processorReferenceNumber>544053</processorReferenceNumber>
	<creditCardCountry>US</creditCardCountry>
	<creditCardScheme>Visa</creditCardScheme>
	<authenticated>Y</authenticated>
</transaction-response>


Exemplo de Requisição de Débito Frictionless

O que caracteriza Debit Sale é o nó debitSale e o tipo de cartão deve ser brigatoriamente debitCard.

<transaction-request>
	<version>3.1.1.15</version>
	<verification>
		<merchantId>{{merchantId}}</merchantId>
		<merchantKey>{{merchantKey}}</merchantKey>
	</verification>
	<order>
		<debitSale>
			<processorID>xx</processorID>
			<fraudCheck>N</fraudCheck>
			<authentication>
				<mpiProcessorID>xxxx</mpiProcessorID>
				<onFailure>decline</onFailure>
			</authentication>
			<referenceNum>Order-001</referenceNum>
			<ipAddress>127.0.0.1</ipAddress>
			<billing>
				<id>0</id>
				<name>Fulano</name>
				<address>Rua Pedro Luiz</address>
				<address2>Casa</address2>
				<city>Guarulhos</city>
				<state>SP</state>
				<postalcode>07151-385</postalcode>
				<country>Brasil</country>
				<phone>(11) 96478-0433</phone>
				<email>fulano.silva@maxipago.com</email>
			</billing>
			<shipping>
				<id>0</id>
				<name>Fulano</name>
				<address>Rua das Flores 22</address>
				<address2>Casa</address2>
				<city>Guarulhos</city>
				<state>SP</state>
				<postalcode>00000-000</postalcode>
				<country>Brasil</country>
				<phone>(11) 96478-5345</phone>
				<email>fulano.silva@maxipago.com</email>
			</shipping>
			<transactionDetail>
				<payType>
					<debitCard>
						<number>5221834791042066</number>
						<expMonth>12</expMonth>
						<expYear>2030</expYear>
						<cvvNumber>999</cvvNumber>
					</debitCard>
				</payType>
			</transactionDetail>
			<payment>
				<currencyCode>BRL</currencyCode>
				<productType>Service</productType>
				<chargeTotal>9.00</chargeTotal>
			</payment>
			<device>
				<colorDepth>1</colorDepth>
				<deviceType3ds>BROWSER</deviceType3ds>
				<javaEnabled>true</javaEnabled>
				<language>BR</language>
				<screenHeight>550</screenHeight>
				<screenWidth>550</screenWidth>
				<timeZoneOffset>3</timeZoneOffset>
			</device>
			<customerIdExt>888.058.830-34</customerIdExt>
			<userAgent>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36</userAgent>
		</debitSale>
		<clientData>
			<comments>JavaPlugin v1.1</comments>
		</clientData>
	</order>
</transaction-request>


Exemplo de Requisição de Débito Frictionless

<?xml version="1.0" encoding="UTF-8"?>
<transaction-response>
	<authCode>123456</authCode>
	<orderID>AC143C39:016B0E1DF9C9:6E8B:563DDDF7</orderID>
	<referenceNum>Order-001</referenceNum>
	<transactionID>709529</transactionID>
	<transactionTimestamp>1559335085</transactionTimestamp>
	<responseCode>0</responseCode>
	<responseMessage>CAPTURED</responseMessage>
	<avsResponseCode>YYY</avsResponseCode>
	<cvvResponseCode>M</cvvResponseCode>
	<processorCode>A</processorCode>
	<processorMessage>APPROVED</processorMessage>
	<processorName>SIMULATOR</processorName>
	<creditCardBin>482481</creditCardBin>
	<creditCardLast4>0008</creditCardLast4>
	<errorMessage/>
	<processorTransactionID>495708</processorTransactionID>
	<processorReferenceNumber>230679</processorReferenceNumber>
	<creditCardCountry>US</creditCardCountry>
	<creditCardScheme>Visa</creditCardScheme>
	<authenticated>Y</authenticated>
</transaction-response>

Exemplo de Requisição Autorização Frictionless

<transaction-request>
	<version>3.1.1.15</version>
	<verification>
		<merchantId>{{merchantId}}</merchantId>
		<merchantKey>{{merchantKey}}</merchantKey>
	</verification>
	<order>
		<auth>
			<processorID>xx</processorID>
			<fraudCheck>N</fraudCheck>
			<authentication>
				<mpiProcessorID>xxxx</mpiProcessorID>
				<onFailure>decline</onFailure>
			</authentication>
			<referenceNum>Order-001</referenceNum>
			<ipAddress>127.0.0.1</ipAddress>
			<billing>
				<id>0</id>
				<name>Fulano</name>
				<address>Rua Pedro Luiz</address>
				<address2>Casa</address2>
				<city>Guarulhos</city>
				<state>SP</state>
				<postalcode>00000-000</postalcode>
				<country>Brasil</country>
				<phone>(11) 96478-3233</phone>
				<email>fulano.silva@maxipago.com</email>
			</billing>
			<shipping>
				<id>0</id>
				<name>Fulano</name>
				<address>Rua Pedro Luiz</address>
				<address2>Casa</address2>
				<city>Guarulhos</city>
				<state>SP</state>
				<postalcode>00000-000</postalcode>
				<country>Brasil</country>
				<phone>(11) 96478-0324</phone>
				<email>fulano.silva@maxipago.com</email>
			</shipping>
			<number>5221834791042066</number>
			<expMonth>12</expMonth>
			<expYear>2030</expYear>
			<cvvNumber>999</cvvNumber>
		</creditCard>
	</payType>
</transactionDetail>
<payment>
	<currencyCode>BRL</currencyCode>
	<productType>Service</productType>
	<chargeTotal>9.00</chargeTotal>
</payment>
<device>
	<colorDepth>1</colorDepth>
	<deviceType3ds>BROWSER</deviceType3ds>
	<javaEnabled>true</javaEnabled>
	<language>BR</language>
	<screenHeight>550</screenHeight>
	<screenWidth>550</screenWidth>
	<timeZoneOffset>3</timeZoneOffset>
</device>
<customerIdExt>888.058.830-34</customerIdExt>
<userAgent>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36</userAgent>undefined</auth>undefined<clientData>
<comments>JavaPlugin v1.1</comments>undefined</clientData>undefined</order>undefined</transaction-request>

Exemplo Retorno e Autorização Frictionless

<?xml version="1.0" encoding="UTF-8"?>
<transaction-response>
	<authCode>123456</authCode>
	<orderID>AC143C39:016B1F329266:A6D4:384FA4FE</orderID>
	<referenceNum>Order-001</referenceNum>
	<transactionID>709648</transactionID>
	<transactionTimestamp>1559621645</transactionTimestamp>
	<responseCode>0</responseCode>
	<responseMessage>AUTHORIZED</responseMessage>
	<avsResponseCode>YYY</avsResponseCode>
	<cvvResponseCode>M</cvvResponseCode>
	<processorCode>A</processorCode>
	<processorMessage>APPROVED</processorMessage>
	<processorName>SIMULATOR</processorName>
	<creditCardBin>482481</creditCardBin>
	<creditCardLast4>0008</creditCardLast4>
	<errorMessage/>
	<processorTransactionID>942933</processorTransactionID>
	<processorReferenceNumber>691815</processorReferenceNumber>
	<creditCardCountry>US</creditCardCountry>
	<creditCardScheme>Visa</creditCardScheme>
	<authenticated>Y</authenticated>
</transaction-response>

Exemplo Requisição de Crédito Parcelado

<transaction-request>
	<version>3.1.1.15</version>
	<verification>
		<merchantId>{{merchantId}}</merchantId>
		<merchantKey>{{merchantKey}}</merchantKey>
	</verification>
	<order>
		<sale>
			<processorID>xx</processorID>
			<fraudCheck>N</fraudCheck>
			<authentication>
				<mpiProcessorID>xxxx</mpiProcessorID>
				<onFailure>decline</onFailure>
			</authentication>
			<referenceNum>Order-001</referenceNum>
			<ipAddress>127.0.0.1</ipAddress>
			<billing>
				<id>0</id>
				<name>Fulano</name>
				<address>Rua Pedro Luiz</address>
				<address2>Casa</address2>
				<city>Guarulhos</city>
				<state>SP</state>
				<postalcode>00000-000postalcode>
					<country>Brasil</country>
					<phone>(11) 96432-0733</phone>
					<email>fulano.silvamaxipago.com</email>
				</billing>
				<shipping>
					<id>0</id>
					<name>Fulano</name>
					<address>Rua Pedro Luiz</address>
					<address2>Casa</address2>
					<city>Guarulhos</city>
					<state>SP</state>
					<postalcode>00000-000</postalcode>
					<country>Brasil</country>
					<phone>(11) 96478-3222</phone>
					<email>fulano.silva@maxipago.com</email>
				</shipping>
				<number>5221834791042066</number>
				<expMonth>12</expMonth>
				<expYear>2030</expYear>
				<cvvNumber>999</cvvNumber>
			</creditCard>
		</payType>
	</transactionDetail>
	<payment>
		<currencyCode>BRL</currencyCode>
		<productType>Service</productType>
		<chargeTotal>9.00</chargeTotal>
		<creditInstallment>
			<numberOfInstallments>2</numberOfInstallments>
			<chargeInterest>N</chargeInterest>
		</creditInstallment>
	</payment>
	<device>
		<colorDepth>1</colorDepth>
		<deviceType3ds>BROWSER</deviceType3ds>
		<javaEnabled>true</javaEnabled>
		<language>BR</language>
		<screenHeight>550</screenHeight>
		<screenWidth>550</screenWidth>
		<timeZoneOffset>3</timeZoneOffset>
	</device>
	<customerIdExt>888.058.830-34</customerIdExt>
	<userAgent>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36</userAgent>
</sale>
<clientData>
	<comments>JavaPlugin v1.1</comments>
</clientData>undefined</order>undefined</transaction-request>

Exemplo Retorno de Crédito Parcelado

8"?>
<transaction-response>
	<authCode>123456</authCode>
	<orderID>AC143C39:016B1F38B2BE:CE0B:58EDFAF8</orderID>
	<referenceNum>Order-001</referenceNum>
	<transactionID>709650</transactionID>
	<transactionTimestamp>1559622046</transactionTimestamp>
	<responseCode>0</responseCode>
	<responseMessage>CAPTURED</responseMessage>
	<avsResponseCode>YYY</avsResponseCode>
	<cvvResponseCode>M</cvvResponseCode>
	<processorCode>A</processorCode>
	<processorMessage>APPROVED</processorMessage>
	<processorName>SIMULATOR</processorName>
	<creditCardBin>482481</creditCardBin>
	<creditCardLast4>0008</creditCardLast4>
	<errorMessage/>
	<processorTransactionID>775300</processorTransactionID>
	<processorReferenceNumber>699315</processorReferenceNumber>
	<creditCardCountry>US</creditCardCountry>
	<creditCardScheme>Visa</creditCardScheme>
	<authenticated>Y</authenticated>
</transaction-response>

Exemplo Requisição Sale Fingerprint

Fingerprint , assim como os demais processos de Challenge, possuem um passo a mais, que é de uma interação com o dispositivo antes de verificar a autorização da transação. Fingerprint é escolhido de acordo com o cartão da requisição. Este processo lê o dispositivo do usuário e retorna um id. A partir disso, é retornado este fingerprintid de forma transparente e validado se é autorizado a fazer a transação.

<transaction-request>
	<version>3.1.1.15</version>
	<verification>
		<merchantId>{{merchantId}}</merchantId>
		<merchantKey>{{merchantKey}}</merchantKey>
	</verification>
	<order>
		<sale>
			<processorID>xx</processorID>
			<fraudCheck>N</fraudCheck>
			<authentication>
				<mpiProcessorID>xxxx</mpiProcessorID>
				<onFailure>decline</onFailure>
			</authentication>
			<referenceNum>Order-001</referenceNum>
			<ipAddress>127.0.0.1</ipAddress>
			<billing>
				<id>0</id>
				<name>Fulano</name>
				<address>Rua Pedro Luiz</address>
				<address2>Casa</address2>
				<city>Guarulhos</city>
				<state>SP</state>
				<postalcode>00000-000</postalcode>
				<country>Brasil</country>
				<phone>(11) 96478-0404</phone>
				<email>fuano.silva@maxipago.com</email>
			</billing>
			<shipping>
				<id>0</id>
				<name>Fulano</name>
				<address>Rua Pedro Luiz</address>
				<address2>Casa</address2>
				<city>Guarulhos</city>
				<state>SP</state>
				<postalcode>00000-000</postalcode>
				<country>Brasil</country>
				<phone>(11) 96478-0404</phone>
				<email>fulano.silva@maxipago.com</email>
			</shipping>
			<transactionDetail>
				<payType>
					<creditCard>
						<number>5221834791042066</number>
						<expMonth>12</expMonth>
						<expYear>2030</expYear>
						<cvvNumber>999</cvvNumber>
					</creditCard>
				</payType>
			</transactionDetail>
			<payment>
				<currencyCode>BRL</currencyCode>
				<productType>Service</productType>
				<chargeTotal>9.00</chargeTotal>
			</payment>
			<device>
				<colorDepth>1</colorDepth>
				<deviceType3ds>BROWSER</deviceType3ds>
				<javaEnabled>true</javaEnabled>
				<language>BR</language>
				<screenHeight>550</screenHeight>
				<screenWidth>550</screenWidth>
				<timeZoneOffset>3</timeZoneOffset>
			</device>
			<customerIdExt>888.058.830-34</customerIdExt>
			<userAgent>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36</userAgent>
		</sale>
		<clientData>
			<comments>JavaPlugin v1.1</comments>
		</clientData>
	</order>
</transaction-request>

Exemplo Retorno Sale Fingerprint

<?xml version="1.0" encoding="UTF-8"?>
<transaction-response>
	<authCode/>
	<orderID>AC143C39:016B22589DDC:1A96:1F45DDD8</orderID>
	<referenceNum>Order-001</referenceNum>
	<transactionID>709667</transactionID>
	<transactionTimestamp>1559674466</transactionTimestamp>
	<responseCode>0</responseCode>
	<responseMessage>ENROLLED</responseMessage>
	<avsResponseCode/>
	<cvvResponseCode/>
	<processorCode>Y</processorCode>
	<processorMessage>Cardholder is enrolled</processorMessage>
	<processorName>SIMULATOR</processorName>
	<creditCardBin>400247</creditCardBin>
	<creditCardLast4>0736</creditCardLast4>
	<errorMessage/>
	<processorTransactionID>13982ff5-21c6-461e-9208-d50e7dc90b1f</processorTransactionID>
	<authenticationURL>http://localhost:8080/redirection_service/auth?ref=zKsqpGQTDwlrvVwqJ%2F%2BPZnVwzFjNN4xMBPIyf%2BuDRSm9pfx7FsBIBml9Z2nMW8owYdNmg%2FLHWoG9%0D%0AsuFyh%2BGjhw%3D%3D</authenticationURL>
	<creditCardScheme>Visa</creditCardScheme>
</transaction-response>

Exemplo Retorno de Cartão não autorizado no programa

A Mensagem retornada de um cartão não inscrito no programa 3DS é Cardholder is not enrolled e o responseMessage retorna DECLINED. Segue o resultado da requisição anterior:

transactionTimestamp>
<responseCode>1</responseCode>
<responseMessage>DECLINED</responseMessage>
<avsResponseCode/>
<cvvResponseCode/>
<processorCode>N</processorCode>
<processorMessage>Cardholder is not enrolled</processorMessage>
<processorName>SIMULATOR</processorName>
<creditCardBin>400000</creditCardBin>
<creditCardLast4>0077</creditCardLast4>
<errorMessage/>
<creditCardScheme>Visa</creditCardScheme>
<authenticated>N</authenticated>undefined</transaction-response>

Exemplo Retorno de Cartão não autorizado no programa

A Mensagem retornada de um cartão não inscrito no programa 3DS é Cardholder is not enrolled e o responseMessage retorna DECLINED. Segue o resultado da requisição anterior:

<?xml version="1.0" encoding="UTF-8"?>
<transaction-response>
	<authCode/>
	<orderID>AC143C39:016B22E1A182:2036:5EC24116</orderID>
	<referenceNum>Order-001</referenceNum>
	<transactionID>709684</transactionID>
	<transactionTimestamp>1559658342503</transactionTimestamp>
	<responseCode>1</responseCode>
	<responseMessage>DECLINED</responseMessage>
	<avsResponseCode/>
	<cvvResponseCode/>
	<processorCode>N</processorCode>
	<processorMessage>Cardholder is not enrolled</processorMessage>
	<processorName>SIMULATOR</processorName>
	<creditCardBin>400000</creditCardBin>
	<creditCardLast4>0077</creditCardLast4>
	<errorMessage/>
	<creditCardScheme>Visa</creditCardScheme>
	<authenticated>N</authenticated>
</transaction-response>

Dados deviceType mobile

A seguir o exemplo de javascript que deve ser preenchido para os informar os dados de device:

<device>
	<deviceType3ds>MOBILE</deviceType3ds>
	<sdkEncData>c2RrRW5jRGF0YQ==</sdkEncData>
	<sdkAppId>17dd3e6f-20e5-452c-a638-f106ece38b7f</sdkAppId>
	<sdkEphemeralPubKey>ai7q834kal0984545</sdkEphemeralPubKey>
	<sdkMaxTimeout>05</sdkMaxTimeout>
	<sdkReferenceNumber>17dd3e6f20e5452ca638f106ece38b7f</sdkReferenceNumber>
	<sdkTransId>733aa357-285b-41ba-943e-a2c4569739fe</sdkTransId>
	<renderOptions>
		<sdkInterface>NATIVE</sdkInterface>
		<sdkUiType>OUT_OF_BAND</sdkUiType>
		<sdkUiType>TEXT</sdkUiType>
	</renderOptions>
</device>

3DS – Tabela de Parâmetros de Envio

3DS – Tabela de Parâmetros de Retorno

Parâmetros retornados no <transaction-response/>