About API codes

API E-commerce Cielo returns four types of codes that represent different moments of the transaction.

Below we explain them in the order in which they can occur:

CodeDescription
HTTP Status CodeThey are standard HTTP codes. It report if the information sent to the API is actually being successful in reaching our ENDPOINTs. If values other than 200 or 201 are appearing, there is some impediment with the comunication with the API
Returned at time of API request
API ErrorsThese codes are responses to content validation of sent data. If they are being displayed, our API calls have been identified and are being validated. If this code is displayed, the request contains errors (EX: size/conditions/registration errors) that prevent the creation of the transaction

Returned at the time of the request to the API
StatusAfter the transaction is created, these codes will be returned, informing how the transaction is at the moment (e.g. Authorized > Captured > Cancelled)

Returned in the Status field
Sales ReturnFormed by a Return code and a message, these codes indicate the reason for a certain Status within a transaction. They indicate, for example, if a transaction with status denied was not authorized due to a negative balance in the issuing bank.

Returned in the ReturnCode and ReturnMessage fields
Occurs only in Credit and Debit Cards