Testing with Postman
Testing with Postman
Postman collection
Postman collection and preconfigured environment can be downloaded from the following link: Installment Loans Postman Collection
INFO:
After testing has been completed successfully, please send one COMPLETE and one CANCELED order sessionId by email to [email protected] to check on our side also.
NOTE:
In the service body, the Id field of the JSON object will always return a null value. Status code 200 is enough to identify success. Please ignore the data in the body.
Instruction
- Add you apiKey, apiSecret and merchantKey to the Postman configuration environment:
![1.png 901](https://files.readme.io/898b92d-1.png)
Configure environment
- To get your access token (Request Access Token) call /oauth/token endpoint (necessary parameters will be filled automatically).
![2.png 899](https://files.readme.io/03b5900-2.png)
Get access token
Received access_token is required to perform the next steps. This parameter will be automatically saved in the configuration.
- To Initiate the application, use /v1/online-installments/applications endpoint.
Fill the parameters in the body and add your merchantKey value:
![3.png 913](https://files.readme.io/3f04359-3.png)
Initiate application
- In the response body you will see the sessionId:
![4.png 832](https://files.readme.io/41ab23a-4.png)
Get sessionId
session_id is needed to cancel or confirm the order
To Cancel the order use
/v1/online-installments/applications/{{session-id}}/cancel
![4.1.png 1462](https://files.readme.io/d72d8bd-4.1.png)
Cancel order
To Confirm the order use
/v1/online-installments/applications/{{session-id}}/confirm
![4.2.png 1034](https://files.readme.io/817352f-4.2.png)
Confirm order
- In the Location Header you will receive an address to which you must redirect the user to fill out the installment application:
![5.png 1145](https://files.readme.io/8d2808b-5.png)
callback URL
Here you can find some request examples:
Example of successful request, status code: 200 OK
- Successful request
![OK.png 1482](https://files.readme.io/eb31b8e-OK.png)
200 OK
In the service body, the Id field of the JSON object will always return a null value. Status code 200 is enough to identify success. Please ignore the data in the body.
Example of successful request, status code: 201
Body:
![201.png 1501](https://files.readme.io/9fb28db-201.png)
Status Code: 201
Redirect URL is in Headers > Location:
![location.png 1504](https://files.readme.io/d19d1b5-location.png)
Redirect URL
Example of rejected request, status code: 404 Not Found
- Merchant was not found - if your MerchantKey is incorrect or was not found
![404.png 1474](https://files.readme.io/28d6d5a-404.png)
Merchant was not found
- Merchant is deactivated
![deactivated.png 1479](https://files.readme.io/f29d5e6-deactivated.png)
Merchant is deactivated
Example of rejected request, status code: 400 Bad Request
- FullPriceInCoins is missing - if priceTotal is not provided
![FullPriceInCoins is missing.png 1492](https://files.readme.io/826f3ef-FullPriceInCoins_is_missing.png)
FullPriceInCoins is missing
- FullPriceInCoins is invalid. Value must be greater than zero.
![FullPriceInCoins is invalid.png 1489](https://files.readme.io/8334540-FullPriceInCoins_is_invalid.png)
FullPriceInCoins is invalid
- Product(s) was not specified
![Product(s) was not specified.png 1493](https://files.readme.io/7c2a03b-Products_was_not_specified.png)
Product(s) was not specified
- Product price is missing
![product price is missing.png 1481](https://files.readme.io/6c282ed-product_price_is_missing.png)
Product price is missing
- Product quantity is missing
![Product quantity is missing.png 1480](https://files.readme.io/ef051e7-Product_quantity_is_missing.png)
Product quantity is missing
- Product quantity is invalid. Value must be 1 or more.
![Product quantity is invalid. Value must be 1 or more..png 1481](https://files.readme.io/5970484-Product_quantity_is_invalid._Value_must_be_1_or_more..png)
Product quantity is invalid.
- Product price and full prices does not match.
![Product price and full prices does not match..png 1476](https://files.readme.io/7d59166-Product_price_and_full_prices_does_not_match..png)
Product price and full prices does not match.
Example of rejected request, status code: 401 Unauthorized
- Active installment with sesseionId not exists
![Active installment with sesseionId not exists.png 1485](https://files.readme.io/90a0be2-Active_installment_with_sesseionId_not_exists.png)
Active installment with sesseionId not exists
- Cannot confirm installment. Expired confirmation date.
![Cannot confirm installment. Expired confirmation date..png 1492](https://files.readme.io/27a2282-Cannot_confirm_installment._Expired_confirmation_date..png)
Cannot confirm installment. Expired confirmation date.
Updated over 2 years ago