Through this endpoint is possible to Authorize a credit card transaction

🚧

Important!

Keep the body params following the same sequence as you see above!

🚧

Authorize x Capture

The store's owner will only receive the payment for an authorised transaction when it's captured(or confirmed)

Example of API Response:

{
    "transactionId": "F1D6E5EC-2D1C-6C43-5C27-F7B12B51D844",
    "operationId": 1,
    "status": 3,
    "message": "AUTHORIZED",
    "log": "",
    "errorCode": "",
    "order": {
        "reference": "123456789",
        "currency": "986",
        "totalAmount": 10000,
        "dateTime": "2019-02-15T11:09:39.492-02:00"
    },
    "processor": {
        "flag": "mastercard",
        "amount": "10000",
        "numberOfPayments": "1",
        "acquirer": "CIELO",
        "acquirerId": "1",
        "urlAuthentication": "",
        "code": "4",
        "message": "Transação autorizada",
        "lr": "00",
        "arp": "123456",
        "nsu": "326891",
        "tid": "1006993069000DA9C6BA",
        "pan": "07TIgQCiIMJ9uDby3dyD7cp8cD8xLd8XuNQ2CqXb5N4=",
        "eci": "0",
        "statusCode": "4",
        "avsResponseCode": "",
        "tokenCard": "0de3b2ca40b4c628f4bccd554c0dfa6621d6b77139c6e7e20246fe4bc4f7140d"
    }
}
{
    "transactionId": null,
    "status": {
        "code": 409,
        "message": "ERROR - XML"
    },
    "result": {
        "error": {
            "code": 101,
            "action": "XML",
            "message": "XML ERROR",
            "details": "<![CDATA[Element 'merchantKey': [facet 'minLength'] The value has a length of '0'; this underruns the allowed minimum length of '10'.\n]]>",
            "moreInfo": "<![CDATA[Please check fields format and special character.]]>"
        }
    }
}

Different Payload examples.
See Credit Card Token.

{
  "transaction-request": {
    "version": "1.0.0",
    "verification": {
      "merchantId": "1",
      "merchantKey": "d41d8cd98f00b204e9800998ecf8427e"
    },
    "authorize": {
      "order": {
        "reference": "123456789",
        "totalAmount": "10000"
      },
      "payment": {
    		"tokenCard": "0de3b2ca40b4c628f4bccd554c0dfa6621d6b77139c6e7e20246fe4bc4f7140d",
        "acquirer": "1",
        "method": "1",
        "amount": "10000",
        "currency": "986",
        "country": "BRA",
        "numberOfPayments": "1",
        "softDescriptor": "Test payload"
      },
      "billing": {
        "customerIdentity": "1",
        "name": "Fulano de Tal",
        "address": "Avenida Federativa, 230",
        "address2": "10 Andar",
        "city": "Mogi das Cruzes",
        "state": "SP",
        "postalCode": "20031170",
        "country": "BR",
        "phone": "114777000",
        "email": "[email protected]"
      },
      "urlReturn": "http://loja.exemplo.com.br",
      "fraud": "false",
      "customField": "This is a custom field being used"
    }
  }
}
{
  "transaction-request": {
    "version": "1.0.0",
    "verification": {
      "merchantId": "1",
      "merchantKey": "d41d8cd98f00b204e9800998ecf8427e"
    },
    "authorize": {
      "order": {
        "reference": "123456789",
        "totalAmount": "10000"
      },
      "payment": [
      {
        "acquirer": "1",
        "method": "1",
        "amount": "5000",
        "currency": "986",
        "country": "BRA",
        "numberOfPayments": "1",
        "flag": "mastercard",
        "cardHolder": "Jose Da Silva",
        "cardNumber": "5392947655401104",
        "cardSecurityCode": "438",
        "cardExpirationDate": "201908",
        "saveCreditCard": "true",
        "generateToken": "true",
        "softDescriptor": "Test payload"
      },
	  	{
        "acquirer": "1",
        "method": "1",
        "amount": "5000",
        "currency": "986",
        "country": "BRA",
        "numberOfPayments": "1",
        "flag": "mastercard",
        "cardHolder": "Yuji Umezaki",
        "cardNumber": "5453010000066100",
        "cardSecurityCode": "123",
        "cardExpirationDate": "201908",
        "saveCreditCard": "true",
        "generateToken": "true",
        "softDescriptor": "Test payload"
    	}
      ],
      "billing": {
        "customerIdentity": "1",
        "name": "Fulano de Tal",
        "address": "Avenida Federativa, 230",
        "address2": "10 Andar",
        "city": "Mogi das Cruzes",
        "state": "SP",
        "postalCode": "20031170",
        "country": "BR",
        "phone": "114777000",
        "email": "[email protected]"
      },
      "urlReturn": "http://loja.exemplo.com.br",
      "fraud": "false",
      "customField": "This is a custom field being used"
    }
  }
}

📘

In case of one of the cards not being authorized

In case of one of the card's authorization fails the other authorization will be canceled automatically

❗️

About cents in the evaluation environment

Do not pass amounts with cents in test environments. E.g <amount>1020<amount> (R$10,20), in this case all transaction will be rejected. It should be like this <amount>1000</amount> (R$10,00)

Language
Click Try It! to start a request and see the response here!