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.
Creating Environment Heaven
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.
Creating the environment:
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 About Cielo E-commerce API.
Importing a Collection
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:
- Access the area of the manual where the Collection link is available.Copy it.
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
- With Postman opened, use the IMPORT button, and select the "IMPORT FROM LINK" option.
- Your Cielo collection is now available. Just select Environment and the requisition. By clicking on SEND, Postman will execute communication with Cielo.