HTTP Codes

The HTTP code, present in the header of every response, indicates the status of the communication between your system and the API E-commerce.

Success responses (2xx)

HTTP CodeDescriptionExample scenario
200 OKYour request was received and processed successfully.Returned in query (GET), capture (PUT), and void (PUT) operations.
201 CreatedYour request to create a resource was successful.Returned when creating a payment transaction, for all payment methods.

Response examples for a credit card transaction:

{
  (...)
  "Payment": {
    (...)
    "Status": 1,
    "ProviderReturnMessage": "Operation Successful",
    "ProviderReturnCode": "4",
  }
}
{
  (...)
  "Payment": {
    (...)
    "Status": 3,
    "ProviderReturnMessage": "Autorizacao negada",
    "ProviderReturnCode": "51",
  }
}

Client error responses (4xx)

Indicate a problem with your request. Generally, you must fix the error before resending the same request.

HTTP CodeDescriptionExample scenarioResponse body
400 Bad RequestThe request is malformed or contains invalid data.Syntax error in the sent JSON; invalid PaymentId in a query.Generally contains the Code and Message fields with error details.
401 UnauthorizedAuthentication error. The credentials (MerchantId and MerchantKey) are incorrect or were not sent.Sending an incorrect MerchantId or MerchantKey in the header.Returns no body.
403 ForbiddenAccess denied.Not authorized due to IP restriction at the merchant.Returns no body.
404 Not FoundThe requested resource was not found.Incorrect endpoint; query for a PaymentId that does not exist or belongs to another merchant; query for a PaymentId older than three months.Returns no body.
405 Method Not AllowedThe HTTP method (GET, POST, PUT) used is incorrect for the endpoint.Using GET on the transaction creation endpoint, which expects POST.Returns no body.

HTTP 400 (Bad Request) error example:

HTTP 400 (Bad Request) errors generally contain the Code and Message fields in the body:

[
  {
    "Code": 132,
    "Message": "MerchantKey is invalid"
  }
]

Code represents the error code, equivalent to ReturnCode, and Message represents the message corresponding to the error, equivalent to ReturnMessage.

Check the codes returned in Code and Message in ReturnCode and ReturnMessage Table.

Server error responses (5xx)

Indicate an internal failure at Cielo's servers, the card brand or issuer, the unavailability of a payment method, or slowness. In these cases, it is recommended to wait and, if the error persists, contact support.

HTTP CodeDescription
500 Internal Server ErrorAn unexpected error occurred on the server.
502 Bad GatewayThe server acting as a gateway received an invalid response from an upstream server.
503 Service UnavailableThe server is not ready to handle the request (e.g., overload or maintenance).

See the API status page to check service availability.