URLs para Tokenizar durante uma venda
SANDBOX: https://testapi.maxipago.net/UniversalAPI/postXML
PRODUÇÃO: https://api.maxipago.net/UniversalAPI/postXML
Exemplo de Request
Importante: ao enviar essa requisição, é preciso que o <customerToken> venha preenchido; dessa forma, os dados serão atrelados ao cartão que crédito e no retorno, será entregue o <token>.
Nos casos de retorno de sucesso as próximas vendas já poderão ser feitas com o <customerToken> e o <token>.
<?xml version="1.0" encoding="UTF-8"?> <transaction-request> <version>3.1.1.15</version> <verification> <merchantId>storeId</merchantId> <merchantKey>storeKey</merchantKey> </verification> <order> <sale> <processorID>1</processorID> <referenceNum>testemp</referenceNum> <fraudCheck>N</fraudCheck> <customerIdExt>77067497035</customerIdExt> <billing> <name>Cliente Gateway</name> <address>R. Volkswagen 1</address> <address2>11º Andar</address2> <district>Jabaquara</district> <city>Sao Paulo</city> <state>SP</state> <postalcode>04344902</postalcode> <country>BR</country> <phone>1140044828</phone> <email>clientegateway@clientegateway.com.br</email> <companyName>maxiPago!</companyName> </billing> <transactionDetail> <payType> <creditCard> <number>5234745068937710</number> <expMonth>07</expMonth> <expYear>2030</expYear> <cvvNumber>600</cvvNumber> </creditCard> </payType> </transactionDetail> <payment> <chargeTotal>1.00</chargeTotal> <currencyCode>BRL</currencyCode> <creditInstallment> <numberOfInstallments>1</numberOfInstallments> <chargeInterest>N</chargeInterest> </creditInstallment> </payment> <saveOnFile> <customerToken>3703434</customerToken> </saveOnFile> </sale> </order> </transaction-request>
Retorno de Request – Sucesso
<?xml version="1.0" encoding="UTF-8"?> <transaction-response> <authCode>123456</authCode> <orderID>0A0104AB:018D618BE5BF:FB31:4E28CEED</orderID> <referenceNum>testemp</referenceNum> <transactionID>15997283</transactionID> <transactionTimestamp>1706738574</transactionTimestamp> <responseCode>0</responseCode> <responseMessage>CAPTURED</responseMessage> <avsResponseCode>YYY</avsResponseCode> <cvvResponseCode>M</cvvResponseCode> <processorCode>A</processorCode> <processorMessage>APPROVED</processorMessage> <processorName>SIMULATOR</processorName> <creditCardBin>523474</creditCardBin> <creditCardLast4>7710</creditCardLast4> <errorMessage/> <processorTransactionID>737096</processorTransactionID> <processorReferenceNumber>333404</processorReferenceNumber> <creditCardCountry>US</creditCardCountry> <creditCardScheme>Mastercard</creditCardScheme> <brandCode>0</brandCode> <brandMessage>BRAND MESSAGE</brandMessage> <brandTransactionID>123456</brandTransactionID> <save-on-file> <token>AjAHYc5IXfc=</token> <creditCardNumber>5234********7710</creditCardNumber> </save-on-file> </transaction-response>
A requisição enviada com sucesso, vai retornar o parâmetro <token>.
Quer saber mais sobre o assunto?
Você encontra mais sobre Salvar Cartões na Base (tokenização) e Criar cadastro de clientes; além das tabelas de parâmetros, acessando links abaixo: