put
https://apisandbox.cieloecommerce.cielo.com.br/1/sales//capture
Perform the partial or total capture of a credit card transaction.
| Environment | Method | Endpoint |
|---|---|---|
| Sandbox | put | https://apisandbox.cieloecommerce.cielo.com.br/1/sales/{paymentId}/capture?amount={Valor}&serviceTaxAmount={Valor} |
| Production | put | https://api.cieloecommerce.cielo.com.br/1/sales/{paymentId}/capture?amount={Valor}&serviceTaxAmount={Valor} |
It is possible to capture a partial amount or the total amount of the transaction.
Partial capture is the act of capturing an amount less than the authorized amount. This capture model can occur only once per transaction.
After a capture, it is not possible to perform additional captures on the same order.
- For partial capture, send the
Amountfield in the capture request with the desired amount to be captured; - For total capture, do not send the
Amountfield. The total authorized amount will be considered.
Warning
- Transactions with a value of less than 20 cents in the financial schedule are not settled. We do not recommend capturing amounts less than 20 cents;
- There is a limitation on the number of capture attempts. When approximately 50 attempts are made, the authorizer blocks new captures and returns code 841 (excessive capture attempts). After this block, it is no longer possible to capture the transaction. To complete the operation, it is necessary to generate a new transaction.
Important: airlines
- The ServiceTaxAmount field is exclusive to airlines;
- To capture the boarding fee, simply add the
ServiceTaxAmountvalue to be captured.
Return codes for capture
When the capture is successful, the API will return the ReturnCode "6" with ReturnMessage "Operation Succesful".
{
...
"ReturnCode": "6",
"ReturnMessage": "Operation Successful",
...
}If there is an error, the API will return the HTTP error and the Code and Message:
[
{
"Code": 308,
"Message": "Transaction not available to capture"
}
]Please refer to API Errors to see the complete list.