capture operation
This page's content:
Endpoints
https://api.ebanxpay.com/ws/capture
https://sandbox.ebanxpay.com/ws/capture
HTTP Method
POST
Response
JSON
This is a server-to-server HTTP POST used by the merchant to capture credit card payments when the auto_capture
flag is false
in the Direct Operation.
Method parameters
Your unique and secret integration key.
The payment hash (EBANX unique identifier).
The payment hash Merchant Payment Code (unique merchant ID).
Optional identifier for the payment capture.
The amount of the partial capture. You can make only one partial capture per authorized payment and this feature is only available in Brazil. If you want to enable this feature, please contact our Integration Team.
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 PIN (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 (Brazil, Mexico, Colombia).
- baloto: Baloto (Colombia).
- bancodobrasil: Banco do Brasil bank transfer (Brazil).
- banrisul: Banrisul bank transfer (Brazil).
- boleto: Boleto bancário (Brazil).
- bradesco: Bradesco bank transfer (Brazil).
- carnet: CARNET credit card (Mexico).
- diners: Diners credit card (Brazil, Colombia).
- discover: Discover credit card (Brazil).
- ebanxaccount: EBANX Account (Brazil).
- eft: Bank Transfer (Colombia).
- elo: Elo credit card (Brazil).
- hipercard: Hipercard credit card (Brazil).
- itau: Itaú bank transfer (Brazil).
- mastercard: MasterCard credit card (Brazil, Mexico, Colombia).
- multicaja: Multicaja (Chile).
- oxxo: OXXO (Mexico).
- pagoefectivo: PagoEfectivo (Peru).
- pagosnet: PagosNet (Bolivia).
- safetypay: SafetyPay (Peru, Ecuador, Checkout only).
- safetypay-cash: SafetyPay Cash (Peru, Ecuador).
- safetypay-online: SafetyPay Online (Peru, Ecuador).
- sencillito: Sencillito (Chile).
- servipag: Servipag (Chile).
- spei: SPEI bank transfer method (Mexico).
- visa: Visa credit card (Brazil, Mexico, Colombia).
- webpay: Webpay (Chile).
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.
If the customer has an EBANX Account profile and it has balance enough to pay for the created boleto, the response will contain this parameter responsible for redirecting the customer to his EBANX Account page so he can pay the boleto with his available balance.
The boleto URL.
The boleto barcode number. (Boleto)
The CIP URL. (PagoEfectivo)
The CIP code. (PagoEfectivo)
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.
(Only for SPEI payments) The customer’s CLABE account.
(Only for SPEI payments) The reference for the current payment.