Capture credit transaction after authorization

Perform the partial or total capture of a credit card transaction.

EnvironmentMethodEndpoint
Sandboxhttps://apisandbox.cieloecommerce.cielo.com.br/1/sales/{paymentId}/capture?amount={Valor}&serviceTaxAmount={Valor}
Productionhttps://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 Amount field in the capture request with the desired amount to be captured;
  • For total capture, do not send the Amount field. 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 ServiceTaxAmount value 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.

Path Params
string
required

Order Identifier Field. Size: 36.

Query Params
int32

Order Amount (to be sent in cents). Size: 15.

int32

Applicable to airlines companies only. Amount of the authorization value/amount that should be allocated to the service fee. Note: This value is not added to the authorization value. Size: 15.

Headers
string
required
Defaults to 8937bd5b-9796-494d-9fe5-f76b3e4da633

Store identifier in API E-commerce Cielo. Size: 36. This documentation provides a default MerchantId to allow testing in the sandbox, but you can also provide the enabled MerchantId during the deployment process.

string
required
Defaults to XKGHUBSBKIRXKAVPSKWLVXYCLVJUGTNZLIHPUSYV

Public Key for Double Authentication in API E-commerce Cielo. Size: 40. This documentation provides a default MerchantKey to allow testing in the sandbox, but you can also provide the enabled MerchantKey during the deployment process.

string

Request Identifier, used when the merchant uses different servers for each GET/POST/PUT. Size: 36.

Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json