Access the new E-commerce developers portal at docs.cielo.com.br.
Warning: The content on this page is being discontinued and will not receive updates after 09/16/2024. Please visit the new documentation at docs.cielo.br.
Postman is an API client that makes it easy for developers to create, share, test, and document APIs. This is done by allowing users to create and save simple and complex HTTP and HTTP requests as well as read their responses.
In addition to the practicality of having all the integration examples and codes ready, POSTMAN is the official test tool for Cielo’s development and support teams. This way, when integrating, if you have doubts, it will be faster and simpler to confirm what may be happening with your code.
Other advantages of POSTMAN:
To use Postman, simply install the APP on your computer. This can be done in two ways:
1.Go to the Chrome Store, search for POSTMAN in APPs
In this area we will explain the different components of the Postman and its functions. After this introduction, the next parts of this tutorial will focus on the settings for API testing
A - Environment: Environment to which requests will be directed. In this area, data will be defined as:
Description | |
---|---|
MerchantId | Store ID on Sky APIs |
MerchantKey | Store Security Key at Sky APIs |
POST / PUT URL | Endpoint To create or edit transactions |
GET URL | Endpoint for Querying Transactions |
We suggest creating two environments, one with production data and another Sandbox, each with its own credentials and URLs. In this way it becomes much simpler to perform tests with the same contract for both environments.
B - Header
Here is the MerchantId / MerchantKey, which by default uses the same data registered in Environment
.
C - Body:
It is the content of the Requisitions. Here is where you can change or create examples for the API and validate the contents of your POST
/ GET
/ PUT
D - Collection:
Location that contains all examples and codes that can be used in the API. Here are the transactions, queries, and other features that exist in the Cielo’s APIs. The number of collections is unlimited, meaning you can create multiple collections to fit your Postman style of use.
The first step in using postman is the creation of the API environment. This setting will define which credentials and endpoints will be used by default, thus avoiding the need to perform configurations for each test.
1 - In the upper right corner, click on the gear and select “Manage environment”.
2 - In the management screen, just fill in the settings according to the screen below:
3 - Now the endpoints and credentials for tests are already registered. We suggest you create two environments: Production
and Sandbox
.
In the Cielo Cielo Ecommerce credentials,
MerchantID
andMerchantKey
, must match the URL environment, that is, Sandbox credentials only work with Sandbox URLs The Checkout Cielo has noMerchantKey
or a sandbox environment. To perform tests, the “Test Mode” must be activated. For more information about Test Mode, access the Backoffice Tutorial.
Cielo has standard collections for its APIs. You can import them directly into your POSTMAN and have all the examples ready to use instantly, without the need to copy them directly from our manuals.
Follow the steps below:
IMPORTANT: In order for your collection to always be up to date, we suggest you always look for the latest version of the collection in the manual. IMPORTED COLLECTIONS DOES NOT HAVE AUTOMATICAL UPDATES
Below, we list the collections and Environments Cielo. Use them in your Postman to perform tests and integrations.
Privacy Policy | |
---|---|
Sandbox | ** Transaction submission **: https://apisandbox.cieloecommerce.cielo.com.br ** Transaction query **: https: //apiquerysandbox.cieloecommerce.cielo.com.br/ |
Production | ** Transaction submission **: https://api.cieloecommerce.cielo.com.br/ ** Transaction query **: https: //apiquery.cieloecommerce.cielo.com.br/ |
Privacy Policy | |
---|---|
Production | Transaction submission: https: //cieloecommerce.cielo.com.br/api |
With its Collection and Environmet configured, creating a transaction with Cielo is extremely easy:
Response Body
- Here is where the data returned from your transactions are listedHTTP Status
- Here you check if your request worked.OBS: If you do not receive a response, check the HTTP status.
POSTMAN allows you to create examples of other languages based on the JSON requests for Cielo products.
Below we show how to generate an example in Python
1 - Access the request you want to convert and click CODE
in the right corner of the screen.
OBS: If this link does not exist on your screen, click Params
2 - Select the language you want to convert, in this case, Python.
3 - The Json sample is converted to Python
Below, we list the Cielo collections and Environments. Use them on your Postman to perform tests and integrations.
https://www.getpostman.com/collections/139520c8fe2210654d7c
Environment | Endpoints |
---|---|
Sandbox | Transaction submission: https://apisandbox.cieloecommerce.cielo.com.br Transaction query: https://apiquerysandbox.cieloecommerce.cielo.com.br/ |
Production | Transaction submission: https://api.cieloecommerce.cielo.com.br/ Transaction query: https://apiquery.cieloecommerce.cielo.com.br/ |
Download the files below and replace the MerchantIDs and MerchantKeys with those in your Store.
https://www.getpostman.com/collections/97969ec643738aac42f4
Environment | Endpoints |
---|---|
Production | Transaction submission: https://cieloecommerce.cielo.com.br/api |
Download the file below and replace the MerchantID with that of your Store.