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:
- To get your access token (Request Access Token) call /oauth/token endpoint (necessary parameters will be filled automatically).
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:
- In the response body you will see the sessionId:
session_id is needed to cancel or confirm the order
To Cancel the order use
/v1/online-installments/applications/{{session-id}}/cancel
To Confirm the order use
/v1/online-installments/applications/{{session-id}}/confirm
- In the Location Header you will receive an address to which you must redirect the user to fill out the installment application:
Here you can find some request examples:
Example of successful request, status code: 200 OK
- Successful request
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:
Redirect URL is in Headers > Location:
Example of rejected request, status code: 404 Not Found
- Merchant was not found - if your MerchantKey is incorrect or was not found
- Merchant is deactivated
Example of rejected request, status code: 400 Bad Request
- FullPriceInCoins is missing - if priceTotal is not provided
- FullPriceInCoins is invalid. Value must be greater than zero.
- Product(s) was not specified
- Product price is missing
- Product quantity is missing
- Product quantity is invalid. Value must be 1 or more.
- Product price and full prices does not match.
Example of rejected request, status code: 401 Unauthorized
- Active installment with sesseionId not exists
- Cannot confirm installment. Expired confirmation date.
Updated about 3 years ago