Captures a credit transaction in the Cielo E-commerce API
At capturing a Split Payments transaction, the transaction split rules must be informed. If the rules are not informed, it is assumed that all the transaction amount is from the Marketplace.
Total Capture
When performing a total capture of a transaction, the sum of all the amounts of each participant must equals the total amount of the transaction that was sent at the moment of authorization.
Environment | Method | Endpoint |
---|---|---|
Sandbox | put | https://apisandbox.cieloecommerce.cielo.com.br/1/sales/{PaymentId}/capture |
Production | put | https://api.cieloecommerce.cielo.com.br/1 /sales/{PaymentId}/capture |
Sandbox | put | https://apisandbox.cieloecommerce.cielo.com.br/1/sales/{PaymentId}/capture?amount=8000 |
Production | put | https://api.cieloecommerce.cielo.com.br/1 /sales/{PaymentId}/capture?amount=8000 |
Request
--header "Authorization: Bearer {access_token}"
{
"SplitPayments":[
{
"SubordinateMerchantId": "7c7e5e7b-8a5d-41bf-ad91-b346e077f769",
"Amount": 6000,
"Fares": {
"Mdr": 5,
"Fee": 30
}
},
{
"SubordinateMerchantId" :"2b9f5bea-5504-40a0-8ae7-04c154b06b8b",
"Amount":4000,
"Fares":{
"Mdr":4,
"Fee":15
}
}
]
}
Parameter | Description | Size | Type |
---|---|---|---|
PaymentId | PaymentId returned in the Create a credit card payment response. | 36 | Text |
Response
{
"Status": 2,
"ReasonCode": 0,
"ReasonMessage": "Successful",
"ProviderReturnCode": "6",
"ProviderReturnMessage": "Operation Successful",
"ReturnCode": "6",
"ReturnMessage": "Operation Successful",
"SplitPayments": [
{
"SubordinateMerchantId": "7c7e5e7b-8a5d-41bf-ad91-b346e077f769",
"Amount": 6000,
"Fares": {
"Mdr": 5,
"Fee": 30
},
"Splits": [
{
"MerchantId": "7c7e5e7b-8a5d-41bf-ad91-b346e077f769",
"Amount": 5670
},
{
"MerchantId": "e4db3e1b-985f-4e33-80cf-a19d559f0f60",
"Amount": 330
}
]
},
{
"SubordinateMerchantId": "2b9f5bea-5504-40a0-8ae7-04c154b06b8b",
"Amount": 4000,
"Fares": {
"Mdr": 4,
"Fee": 15
},
"Splits": [
{
"MerchantId": "2b9f5bea-5504-40a0-8ae7-04c154b06b8b",
"Amount": 3825
},
{
"MerchantId": "e4db3e1b-985f-4e33-80cf-a19d559f0f60",
"Amount": 175
}
]
}
]
}
Partial Capture
When performing a partial capture of a transaction, the sum of the amount of each participant should equals the total amount captured.
Request
--header "Authorization: Bearer {access_token}"
The following example captures partially the amount of BRL 80.00 of a transaction with the authorized value of BRL 100.00.
--header "Authorization: Bearer {access_token}"
{
"SplitPayments":[
{
"SubordinateMerchantId": "7c7e5e7b-8a5d-41bf-ad91-b346e077f769",
"Amount": 5000,
"Fares": {
"Mdr": 5,
"Fee": 30
}
},
{
"SubordinateMerchantId" :"2b9f5bea-5504-40a0-8ae7-04c154b06b8b",
"Amount":3000,
"Fares":{
"Mdr":4,
"Fee":15
}
}
]
}
Parameter | Description | Size | Type |
---|---|---|---|
PaymentId | PaymentId returned in the Create a credit card payment response. | 36 | Text |
Response
{
"Status": 2,
"ReasonCode": 0,
"ReasonMessage": "Successful",
"ProviderReturnCode": "6",
"ProviderReturnMessage": "Operation Successful",
"ReturnCode": "6",
"ReturnMessage": "Operation Successful",
"SplitPayments": [
{
"SubordinateMerchantId": "7c7e5e7b-8a5d-41bf-ad91-b346e077f769",
"Amount": 5000,
"Fares": {
"Mdr": 5,
"Fee": 30
},
"Splits": [
{
"MerchantId": "7c7e5e7b-8a5d-41bf-ad91-b346e077f769",
"Amount": 4720
},
{
"MerchantId": "e4db3e1b-985f-4e33-80cf-a19d559f0f60",
"Amount": 280
}
]
},
{
"SubordinateMerchantId": "2b9f5bea-5504-40a0-8ae7-04c154b06b8b",
"Amount": 3000,
"Fares": {
"Mdr": 4,
"Fee": 15
},
"Splits": [
{
"MerchantId": "2b9f5bea-5504-40a0-8ae7-04c154b06b8b",
"Amount": 2865
},
{
"MerchantId": "e4db3e1b-985f-4e33-80cf-a19d559f0f60",
"Amount": 135
}
]
}
]
}
As previously explained, if a full or partial capture is performed without informing the split rules, Split interprets that the entire amount is destined for the Marketplace itself.