HANDSHAKE_DISPUTE via polling ou webhook/accept, /reject, ou /alternative antes de expiresAtHANDSHAKE_SETTLEMENT confirmando resoluçãotimeoutAction automaticamentedisputeId (não reutilizável)HANDSHAKE_DISPUTE contendo negociação, ação solicitada, evidências, prazo e ação automática de timeout. Inclui DisputeAlternative para reembolsos e Item/GarnishItem para cancelamentos parciais.Identificação e contexto| Atributo | Descrição | Tipo | Obrigatório |
|---|---|---|---|
| id | ID da negociação | uuid | ✓ |
| parentDisputeId | ID da negociação original (se contraproposta) | uuid | |
| createdAt | Data/hora de criação | DateTime | ✓ |
| message | Justificativa do cliente | String | ✓ |
| Atributo | Descrição | Tipo | Obrigatório |
|---|---|---|---|
| action | Propósito da negociação | String | ✓ |
| handshakeType | Tipo de negociação | String | ✓ |
| handshakeGroup | Classificação | String | ✓ |
action:CANCELLATION — Cancelamento totalPARTIAL_CANCELLATION — Cancelamento parcialPROPOSED_AMOUNT_REFUND — Reembolso propostoPROPOSED_ADDITIONAL_TIME — Extensão de tempo propostaVOID — Sem açãohandshakeType:AFTER_DELIVERY — Cancelamento após cliente receberDELAY — Cancelamento por entrega atrasadaPREPARATION_TIME — Cancelamento durante preparoAFTER_DELIVERY_PARTIALLY — Cancelamento parcial após entrega| Atributo | Descrição | Tipo | Obrigatório |
|---|---|---|---|
| expiresAt | Prazo para resposta | DateTime | ✓ |
| timeoutAction | Ação se não responder | String | ✓ |
timeoutAction:ACCEPT_CANCELLATION — Cancelar automaticamenteREJECT_CANCELLATION — Rejeitar cancelamento automaticamenteVOID — Sem ação automática| Atributo | Descrição | Tipo | Obrigatório |
|---|---|---|---|
| alternatives | Opções de resposta disponíveis | List of DisputeAlternative | |
| metadata.item | Itens para cancelamento parcial | List of Item | |
| metadata.garnishItems | Sub-itens (complementos) | List of GarnishItem | |
| metadata.evidences | Fotos/mídias do cliente | List of Media | |
| metadata.acceptCancellationReasons | Motivos válidos para aceitar | List of String |
HANDSHAKE_SETTLEMENT contendo status e motivo da resolução. Inclui SelectedDisputeAlternative para contrapropostas aceitas.| Atributo | Descrição | Tipo | Obrigatório |
|---|---|---|---|
| id | ID do settlement | uuid | ✓ |
| disputeId | ID da negociação resolvida | uuid | ✓ |
| status | Resultado final | String | ✓ |
| reason | Justificativa de rejeição | String | |
| selectedDisputeAlternative | Contraproposta (se status = ALTERNATIVE_REPLIED) | SelectedDisputeAlternative |
status:ACCEPTED — Negociação aceitaREJECTED — Negociação rejeitadaEXPIRED — Sem resposta até prazoALTERNATIVE_REPLIED — Contraproposta enviada e aceitaHandshakeDispute. Valores válidos para type: REFUND, BENEFIT, ADDITIONAL_TIME.| Atributo | Descrição | Tipo | Obrigatório |
|---|---|---|---|
| id | ID da alternativa | uuid | ✓ |
| type | Tipo de resolução | String | ✓ |
| metadata.maxAmount | Valor máximo (REFUND/BENEFIT) | Amount | Cond |
| metadata.allowedsAdditionalTimeInMinutes | Opções de extensão (minutos) | List of Int | Cond |
| metadata.allowedsAdditionalTimeReasons | Motivos para atraso | List of String | Cond |
HandshakeSettlement. Valores válidos para type: REFUND, BENEFIT, ADDITIONAL_TIME.| Atributo | Descrição | Tipo | Obrigatório |
|---|---|---|---|
| id | ID da alternativa | uuid | ✓ |
| type | Tipo de resolução | String | ✓ |
| metadata.amount | Valor (REFUND/BENEFIT) | Amount | Cond |
| metadata.additionalTimeInMinutes | Extensão de tempo | int | Cond |
| metadata.reason | Motivo do atraso | String | Cond |
| Atributo | Tipo |
|---|---|
| url | String (requer autenticação) |
| contentType | String (MIME type) |
| Atributo | Tipo |
|---|---|
| id | uuid |
| uniqueId | uuid |
| externalCode | String |
| quantity | int |
| index | int |
| amount | Amount |
| reason | String |
| Atributo | Tipo |
|---|---|
| id | uuid |
| parentUniqueId | uuid |
| externalCode | String |
| quantity | int |
| index | int |
| amount | Amount |
| reason | String |
| Atributo | Descrição | Tipo |
|---|---|---|
| value | Valor sem decimais (R$1,00 = 100) | String |
| currency | Código de moeda (ex: BRL) | String |
handshakeType| Valor | Descrição |
|---|---|
AFTER_DELIVERY | Cancelamento após cliente receber |
DELAY | Cancelamento por entrega atrasada |
PREPARATION_TIME | Cancelamento durante preparo |
AFTER_DELIVERY_PARTIALLY | Cancelamento parcial após entrega |
handshakeGroup| Valor | Descrição |
|---|---|
CUSTOMER_ORDER_SUPPORT | Negociação iniciada por cliente |
action| Valor | Descrição |
|---|---|
CANCELLATION | Cancelamento total |
PARTIAL_CANCELLATION | Cancelamento parcial |
PROPOSED_AMOUNT_REFUND | Cancelamento com opção de reembolso |
timeoutAction| Valor | Ação |
|---|---|
ACCEPT_CANCELLATION | Cancelar automaticamente |
REJECT_CANCELLATION | Rejeitar cancelamento automaticamente |
VOID | Sem ação automática |
status| Valor | Descrição |
|---|---|
ACCEPTED | Negociação aceita |
REJECTED | Negociação rejeitada |
EXPIRED | Sem resposta até prazo |
ALTERNATIVE_REPLIED | Contraproposta enviada e aceita |
type| Valor | Descrição |
|---|---|
REFUND | Reembolso em dinheiro |
BENEFIT | Crédito/benefício |
ADDITIONAL_TIME | Extensão de tempo |
negotiationReasons| Motivo | Contexto |
|---|---|
HIGH_STORE_DEMAND | Loja em capacidade máxima |
UNKNOWN_ISSUE | Problema não especificado |
CUSTOMER_SATISFACTION | Satisfação do cliente |
INVENTORY_CHECK | Verificação de disponibilidade |
SYSTEM_ISSUE | Problema técnico |
WRONG_ORDER | Pedido incorreto |
PRODUCT_QUALITY | Qualidade do produto |
LATE_DELIVERY | Entrega atrasada |
CUSTOMER_REQUEST | Solicitação do cliente |
POST https://merchant-api.ifood.com.br/order/v1.0/disputes/{disputeId}/acceptParâmetros:| Nome | Tipo | Descrição |
|---|---|---|
disputeId | uuid | ID da dispute (URL) |
reason | string | Motivo de metadata.acceptCancellationReasons |
detailReason | string | Descrição (250 chars máx) |
curl -X POST "https://merchant-api.ifood.com.br/order/v1.0/disputes/dispute_001/accept" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"reason": "CUSTOMER_SATISFACTION", "detailReason": "Reembolso por cortesia"}'{
"id": "settlement_001",
"status": "ACCEPTED",
"disputeId": "dispute_001",
"createdAt": "2024-04-25T18:05:00Z"
}| Status | Código | Motivo |
|---|---|---|
| 401 | - | Token inválido |
| 404 | DISPUTE_NOT_FOUND | Dispute não encontrada |
| 422 | DISPUTE_ALREADY_ANSWERED | Já respondida |
| 400 | INVALID_REASON | Motivo inválido |
POST https://merchant-api.ifood.com.br/order/v1.0/disputes/{disputeId}/rejectParâmetros:| Nome | Tipo | Descrição |
|---|---|---|
disputeId | uuid | ID da dispute (URL) |
reason | string | Motivo de negotiationReasons |
curl -X POST "https://merchant-api.ifood.com.br/order/v1.0/disputes/dispute_002/reject" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"reason": "INVENTORY_CHECK"}'{
"id": "settlement_002",
"status": "REJECTED",
"disputeId": "dispute_002",
"createdAt": "2024-04-25T18:08:00Z"
}| Status | Código | Motivo |
|---|---|---|
| 401 | - | Token inválido |
| 404 | DISPUTE_NOT_FOUND | Dispute não encontrada |
| 422 | DISPUTE_ALREADY_ANSWERED | Já respondida |
| 400 | INVALID_REASON | Motivo inválido |
POST https://merchant-api.ifood.com.br/order/v1.0/disputes/{disputeId}/alternativeParâmetros:| Nome | Tipo | Descrição |
|---|---|---|
disputeId | uuid | ID da dispute (URL) |
type | string | REFUND, BENEFIT ou ADDITIONAL_TIME |
metadata.amount | Amount | Valor (REFUND/BENEFIT) |
metadata.additionalTimeInMinutes | int | Minutos (ADDITIONAL_TIME) |
metadata.reason | string | Motivo do atraso (ADDITIONAL_TIME) |
curl -X POST "https://merchant-api.ifood.com.br/order/v1.0/disputes/dispute_001/alternative" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"type": "REFUND",
"metadata": {
"amount": {
"value": "5000",
"currency": "BRL"
}
}
}'{
"id": "settlement_003",
"status": "ALTERNATIVE_REPLIED",
"disputeId": "dispute_003",
"selectedDisputeAlternative": {
"id": "alt_001",
"type": "ADDITIONAL_TIME",
"metadata": {
"additionalTimeInMinutes": 30,
"reason": "HIGH_STORE_DEMAND"
}
},
"createdAt": "2024-04-25T18:12:00Z"
}| Status | Código | Motivo |
|---|---|---|
| 401 | - | Token inválido |
| 404 | DISPUTE_NOT_FOUND | Dispute não encontrada |
| 422 | DISPUTE_ALREADY_ANSWERED | Já respondida |
| 400 | INVALID_AMOUNT | Valor fora do intervalo |
| Cenário | handshakeType | action | Respostas |
|---|---|---|---|
| Total após entrega | AFTER_DELIVERY | CANCELLATION | Aceitar / Rejeitar / REFUND |
| Total durante preparo | PREPARATION_TIME | CANCELLATION | Aceitar / Rejeitar |
| Total (atraso) | DELAY | CANCELLATION | Aceitar / Rejeitar / ADDITIONAL_TIME |
| Parcial após entrega | AFTER_DELIVERY_PARTIALLY | PARTIAL_CANCELLATION | Aceitar / Rejeitar / REFUND |
expiresAt, timeoutAction é executada:HANDSHAKE_SETTLEMENT com status: EXPIRED.| Atributo | Tipo |
|---|---|
| id | string |
| code | string (sempre "HSD") |
| fullCode | string (sempre "HANDSHAKE_DISPUTE") |
| orderId | uuid |
| merchantId | uuid |
| createdAt | DateTime |
| metadata | HandshakeDispute |
{
"id": "evt_001",
"code": "HSD",
"fullCode": "HANDSHAKE_DISPUTE",
"orderId": "ord_12345",
"merchantId": "merchant_001",
"createdAt": "2024-04-25T18:02:46.921Z",
"metadata": {
"id": "dispute_001",
"action": "CANCELLATION",
"handshakeType": "AFTER_DELIVERY",
"handshakeGroup": "CUSTOMER_ORDER_SUPPORT",
"message": "Comida chegou fria",
"expiresAt": "2024-04-25T18:09:46Z",
"timeoutAction": "REJECT_CANCELLATION",
"createdAt": "2024-04-25T18:02:46Z",
"alternatives": [
{
"id": "alt_001",
"type": "REFUND",
"metadata": {
"maxAmount": {
"currency": "BRL",
"value": "5000"
}
}
}
],
"acceptCancellationReasons": ["PRODUCT_QUALITY", "CUSTOMER_SATISFACTION"],
"evidences": [
{
"url": "https://merchant-api.ifood.com.br/orders/ord_12345/evidences/abc123",
"contentType": "image/jpeg"
}
]
}
}| Atributo | Tipo |
|---|---|
| id | string |
| code | string (sempre "HSS") |
| fullCode | string (sempre "HANDSHAKE_SETTLEMENT") |
| orderId | uuid |
| merchantId | uuid |
| createdAt | DateTime |
| metadata | HandshakeSettlement |
{
"id": "evt_settlement_001",
"code": "HSS",
"fullCode": "HANDSHAKE_SETTLEMENT",
"orderId": "ord_12345",
"merchantId": "merchant_001",
"createdAt": "2024-04-25T18:05:00Z",
"metadata": {
"id": "settlement_001",
"disputeId": "dispute_001",
"status": "ACCEPTED",
"reason": "CUSTOMER_SATISFACTION",
"createdAt": "2024-04-25T18:05:00Z"
}
}