cancel operation
This page's content:
Endpoints
https://api.ebanx.com.br/ws/cancel
https://staging.ebanx.com.br/ws/cancel
HTTP Method
POST
Response
JSON
The cancel operation is a server-to-server operation that cancels payments.
You can cancel one payment if, and only if, its status is open (OP) or pending (PE). It’s important to know that confirmed payments (CO) cannot be cancelled.
Method parameters
Your unique and secret integration key.
The payment hash (EBANX unique identifier).
This method call will return a JSON object with the payment data:
Response parameters
The status of the the request (SUCCESS or ERROR).
A JSON object that represents the payment.
The payment hash (EBANX unique identifier).
The payment BIN (EBANX and Customer unique identifier).
The country of the payment.
The payment hash Merchant Payment Code (unique merchant ID).
The order number, optional identifier set by the merchant. You can have multiple payments with the same order number.
The payment status. The following statuses are available:
- OP: the customer has not yet filled the payment details on the EBANX Checkout. It can change either to CA (time out) or PE.
- PE: the payment is pending confirmation. It can change either to CA or CO.
- CO: the payment is confirmed (paid).
- CA: the payment is cancelled.
The date and hour of the last status change.
The date and hour of when the payment was created.
The date and hour of when the payment was confirmed.
The date and hour of when the payment was settled.
The amount in local currency.
The tax amount in local currency (varies between countries).
The amount in the original currency.
The exchange rate used in the payment.
Three-letter code of the original currency.
Expiry date of the payment (not applicable to all payment methods).
Number of instalments for the payment, default value is 1.
The code of the payment method. The supported codes are:
- amex: American Express credit card.
- boleto: Boleto bancário.
- diners: Diners credit card.
- discover: Discover credit card.
- elo: Elo credit card.
- hipercard: Hipercard credit card.
- mastercard: MasterCard credit card.
- visa: Visa credit card.
A JSON object that represents the payment details.
The billing descriptor of the payment.
A JSON object that represents the payment credit card transaction.
The acquirer that processed the transaction.
The transaction status code:
- OK: The transaction amount was approved.
- NOK: The acquirer did not approved the transaction. The customer must contact the issuer to check for any issue with his credit card.
- RETRY: Something went wrong with the process. You can retry with the same data. We recommend you to try more 3 times on different periods of time (first try, then second try after 2 hours after the first, etc).
You can see more of these status HERE.
The description for the status code, which is returned from the acquirer.
Transaction authentication code in the acquirer.
Flag that shows if a payment is pre-approved by the credit card acquirer.
Flag that shows if a payment is ready to be captured. Applies only to credit cards when auto_capture
is set to false. Some remarks on this attribute:
- A payment can only be captured if
pre_approved
value istrue
, which means that the payment has been pre approved by the credit card acquirer. Before capture, an authorized payment has status as PE (pending). After the capture, the status changes to CO (confirmed). A payment can only be captured if the status is PE (pending). *Payments must be captured in 4 (four) days, otherwise they are automatically cancelled.
NOTE: It can be changed up to 5 (five) days.
The URL the customer should be redirected to. Applies to certain payment methods using the Direct API.
The boleto URL.
The boleto barcode number. (Boleto)
An array of objects that represent a refund linked to this payment. This node will only be present if a refund was issued.
The ID of the refund on EBANX.
The ID of the refund on the merchant system (optional).
The status of the refund:
- RE (Requested): The refund has been requested and is waiting to be processed. It can be cancelled while it has this status.
- PE (Pending): The refund is being processed. It cannot be cancelled anymore.
- CO (Confirmed): The refund was processed and the money was sent back to the customer.
- CA (Cancelled): The refund was cancelled.
The date and hour when the refund was created.
The date and hour when the customer data was received
The date and hour when the money was transferred to the customer.
The refunded amount in the original currency.
Description of the refund reason.
A JSON object that represents a chargeback linked to this payment. This node will only be present if a chargeback was issued.
The date and hour when the chargeback was imported into the system.
The date and hour when the chargeback was created by the acquirer on behalf of the customer.
Description of the chargeback.
Flag that shows if a chargeback credit was issued.