Para pré autorizar um pedido com divisão de pagamento basta criar um pedido com divisão de pagamento sem a captura, informando o objeto "capture" como false. E para capturar parcialmente um pedido com divisão de pagamento, deve-se seguir as recomendações da página capturar pagamento informando as novas regras de divisão de pagamentos.
curl --request POST \
--url https://sandbox.api.pagseguro.com/charges/char_id/capture \
--header 'Authorization: Bearer <token>' \
--header 'accept: application/json' \
--header 'content-type: application/json'
{
"amount": {
"value": 5000
},
"splits": {
"method": "PERCENTAGE",
"receivers": [
{
"account": {
"id": "ACCO_67890"
},
"amount": {
"value": 60
}
},
{
"account": {
"id": "ACCO_12345"
},
"amount": {
"value": 40
}
}
]
}
}
{
"id": "CHAR_0AAE9EA3-8247-4AD5-AF0E-DC0000000000",
"reference_id": "Exemplo",
"status": "PAID",
"created_at": "2023-11-30T10:22:54.425-03:00",
"paid_at": "2023-11-30T10:33:35.000-03:00",
"description": "Descrição exemplo",
"amount": {
"value": 10000,
"currency": "BRL",
"summary": {
"total": 10000,
"paid": 5000,
"refunded": 0
}
},
"payment_response": {
"code": "20000",
"message": "SUCESSO",
"reference": "113055700000",
"raw_data": {
"authorization_code": "000000",
"nsu": "113055700000",
"reason_code": "00"
}
},
"payment_method": {
"type": "CREDIT_CARD",
"installments": 1,
"capture": false,
"capture_before": "2023-11-30T10:22:58-03:00",
"card": {
"brand": "mastercard",
"first_digits": "510000",
"last_digits": "0073",
"exp_month": "1",
"exp_year": "2020",
"holder": {
"name": "Exemplo",
"tax_id": "65544332211"
}
},
"notification_urls": [
"https://exemplo.com"
],
"metadata": {
"Exemplo": "Texto Exemplo"
},
"links": [
{
"rel": "SELF",
"href": "https://sandbox.api.pagseguro.com/charges/CHAR_0AAE9EA3-8247-4AD5-AF7E-DCD02020299D",
"media": "application/json",
"type": "GET"
},
{
"rel": "CHARGE.CANCEL",
"href": "https://sandbox.api.pagseguro.com/charges/CHAR_0AAE9EA3-8247-4AD5-AF0E-DC0000000000/cancel",
"media": "application/json",
"type": "POST"
},
{
"rel": "SPLIT",
"href": "https://sandbox.api.pagseguro.com/splits/SPLI_45345E65-507E-47D9-B3C6-000000000000",
"media": "application/json",
"type": "GET"
}
]
}