Quick start
This guide shows the process of cancelling a payment, using Carat Portal's REST web service interface.
What you'll need#
esitef_usnof a payment confirmed on Carat Portal. Learn more.- A tool capable of performing HTTP calls, such as Postman, REST Client or cURL
- An application capable of receiving POST HTTPS calls
Creating a cancel transaction#
HTTP method: POST
URL: https://sandbox.ecomm-bin.fiserv.com.br/e-sitef/api/v1/cancellations
Headers:
- Content-Type: application/json
- merchant_id: {your merchant id}
- merchant_key: {your merchant key}
Request:
Fill the <payment_usn> field in the request below with the esitef_usn obtained in the payment response.
To use this example, don't forget to define the variable {{url}} to the value
sandbox.ecomm-bin.fiserv.com.br
Receiving the authenticity POST:
Response:
Learn more about this service.
Cancelling the payment#
HTTP method: PUT
URL: https://sandbox.ecomm-bin.fiserv.com.br/e-sitef/api/v1/cancellations/<nit>
Replace the <nit> field in the URL above with the NIT obtained on the authenticity POST.
Headers:
- Content-Type: application/json
- merchant_id: {your merchant id}
- merchant_key: {your merchant key}
Request:
To use this example, don't forget to define the variable {{url}} to the value
sandbox.ecomm-bin.fiserv.com.br
Response:
Learn more about this service.
Checking the cancel status#
HTTP method: GET
URL: https://sandbox.ecomm-bin.fiserv.com.br/e-sitef/api/v1/transactions/<nit>
Replace the <nit> field in the URL above with the NIT obtained on the authenticity POST.
Headers:
- Content-Type: application/json
- merchant_id: {your merchant id}
- merchant_key: {your merchant key}
Request:
To use this example, don't forget to define the variable {{url}} to the value
sandbox.ecomm-bin.fiserv.com.br
Response: