{"templateId":"markdown","versions":[{"version":"opendelivery","label":"Open Delivery API","link":"/apis/docs/development-guides/orders/order-cancellation","default":true,"active":true,"folderId":"58c9a61d"},{"version":"standard","label":"Standard Keeta API","link":"/apis/standard/docs/development-guides/orders/order-cancellation","default":false,"active":false,"folderId":"58c9a61d"},{"version":"grocery","label":"Grocery Keeta API","link":"/apis/grocery/docs/development-guides/orders/order-cancellation","default":false,"active":false,"folderId":"58c9a61d"}],"sharedDataIds":{"sidebar":"sidebar-apis/@grocery/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Cancelamento e Reembolso"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"id":"4.-order-cancellation","level":2,"__idx":0},"children":["Cancelamento e Reembolso "]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1-cancelamento","__idx":1},"children":["1. Cancelamento"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Toda solicitação de cancelamento leva:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reason"]}," — texto livre;"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," — motivo (enum abaixo);"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mode"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AUTO"]}," ou ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MANUAL"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/cancellation.59d469f163eb8724c5a3176459ff85b45b8f2487a6cf7cf86ad31650073ee239.3513d994.png","alt":"Fluxo de cancelamento"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/opendelivery/orderapi/requestcancellation"},"children":["POST /v1/orders/{orderId}/requestCancellation"]}," responde ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["202"]},", que significa só \"pedido recebido para análise\". ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["O pedido só está cancelado quando chegar o evento ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CANCELLED"]},"."]}," Dependendo do momento, a Keeta pode consultar o cliente antes de aceitar."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"códigos-de-cancelamento-v107","__idx":2},"children":["Códigos de cancelamento (v1.0.7+)"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"code"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Significado"},"children":["Significado"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Uso típico"},"children":["Uso típico"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SYSTEMIC_ISSUES"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Problemas sistêmicos"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Falha de PDV/integração"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DUPLICATE_APPLICATION"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Pedido duplicado"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cliente fez o mesmo pedido duas vezes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UNAVAILABLE_ITEM"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Item indisponível"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Acabou o produto; informe em ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["outOfStockItems"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RESTAURANT_WITHOUT_DELIVERY_PERSON"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Restaurante sem entregador"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Entrega própria sem motoboy disponível"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OUTDATED_MENU"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cardápio desatualizado"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Desativa os itens listados em ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invalidItems"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ORDER_OUTSIDE_THE_DELIVERY_AREA"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fora da área de entrega"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Endereço fora do raio"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BLOCKED_CUSTOMER"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cliente bloqueado"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Histórico de fraude/problemas"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OUTSIDE_DELIVERY_HOURS"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fora do horário de entrega"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Pedido chegou após o fechamento"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INTERNAL_DIFFICULTIES_OF_THE_RESTAURANT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Dificuldades internas"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Falta de energia, cozinha parada"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RISK_AREA"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Área de risco"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Endereço em área considerada insegura"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DELIVERY_PROBLEM"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Problema na entrega"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Falha logística"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Códigos antigos (legado, ainda aceitos):"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INSUFFICIENT_DISHES"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SUSPENSION_OF_BUSINESS"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INSUFFICIENT_MANPOWER"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OTHERS"]},". Atenção: o ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["metadata"]}," do evento ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CANCELLED"]}," ainda pode trazer esses valores antigos — trate os dois conjuntos ao ler eventos."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cancelamentos iniciados pela Keeta:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CONSUMER_CANCELLATION_REQUESTED"]}," — o cliente pediu (pode não estar habilitado para todo merchant ou só valer antes da confirmação)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OTHER_CANCELLATION_REASON"]}," — o sistema cancelou (ex.: sem aceite no prazo, nenhum entregador aceitou, entregador reportou loja fechada)."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Em ambos os casos o Software Service recebe o evento e deve atualizar o pedido."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"_","__idx":3},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"2-reembolso","__idx":4},"children":["2. Reembolso"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["O cliente pede reembolso total ou parcial no app → a Keeta envia ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["USER_REFUND_REQUEST"]}," com itens e valores no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["metadata"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["O merchant responde: aceita → ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/opendelivery/orderapi/acceptrefund"},"children":["POST /v1/orders/{orderId}/acceptRefund"]}," → evento ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REFUNDED"]},"; recusa → ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/opendelivery/orderapi/rejectrefund"},"children":["POST /v1/orders/{orderId}/rejectRefund"]}," → evento ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REFUND_FAILED"]},"."]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["O merchant ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["não"]}," consegue iniciar reembolso pela API."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Responder pela API ou pelo Merchant Portal dá o mesmo resultado; ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["vale a primeira resposta recebida"]},". Disputas podem ser conduzidas pelo chat (Instant Messenger) do Merchant Portal.",{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"_-1","__idx":5},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/refund.02f8b3b518eed9c30365026da32dcd7809b9579967be07448b162a8f35e31b5b.3513d994.png","alt":"Fluxo de reembolso"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"_-2","__idx":6},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Exemplo de ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["metadata"]}," de ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["USER_REFUND_REQUEST"]}," (adaptado para o Brasil; valores em centavos):"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"money\": 3790,\n  \"opTime\": 1760380200000,\n  \"shopId\": \"159416882\",\n  \"status\": 5002,\n  \"currency\": \"BRL\",\n  \"isAppeal\": 0,\n  \"partRefund\": 1,\n  \"applyOpType\": 10,\n  \"applyReason\": \"Item errado\",\n  \"orderViewId\": 783441058793308,\n  \"handleOpType\": 20,\n  \"handleReason\": \"Merchant concordou com o reembolso\",\n  \"refundProducts\": [\n      {\n          \"id\": 12053105,\n          \"name\": \"Pastel de carne\",\n          \"count\": 1,\n          \"price\": 1490,\n          \"skuId\": 8949938,\n          \"spuId\": 9897081,\n          \"groups\": [],\n          \"currency\": \"BRL\",\n          \"nameI18n\": {\n              \"pt-BR\": \"Pastel de carne\",\n              \"default\": \"Pastel de carne\"\n          },\n          \"priceStr\": \"R$ 14,90\",\n          \"refundType\": 1,\n          \"originPrice\": 1490,\n          \"refundCount\": 1,\n          \"refundPrice\": 0,\n          \"orderProductId\": 359379560,\n          \"skuOpenItemCode\": \"PDV-2001\",\n          \"spuOpenItemCode\": \"PDV-2000\"\n      }\n  ],\n  \"afterSaleOrderId\": 783440453161676\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["O ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["metadata"]}," é uma ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["string JSON"]}," dentro do evento — faça o parse. Os códigos ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["applyOpType"]}," e ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["handleOpType"]}," não têm tabela oficial publicada; trate-os como informativos."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"_-3","__idx":7},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3-política-de-transações-reversas","__idx":8},"children":["3. Política de transações reversas"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Cliente"},"children":["Cliente"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Merchant"},"children":["Merchant"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Atendimento Keeta"},"children":["Atendimento Keeta"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Sistema"},"children":["Sistema"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cancelamento"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Em full service, só antes de o merchant confirmar, sem precisar de aprovação"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Pode cancelar até ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["48 h após a conclusão"]},", pelo seu sistema ou pelo Order Management da Keeta (neste caso, a Keeta notifica via API)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Pode cancelar até ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["30 dias após a conclusão"]},"; o evento é enviado ao Software Service"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cancela pedido não aceito em ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["5 min"]},"; a loja é fechada temporariamente"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Reembolso"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Gera evento e exige aprovação do merchant; o merchant pode tratar disputas pelo Merchant Portal"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Não pode iniciar reembolso pela API"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Igual à coluna do cliente"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ou seja: a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Keeta pode enviar cancelamento ou reembolso a qualquer momento"]},". Decida se o seu sistema acompanha o status da Keeta ou descarta essas notificações em certos estados (ex.: depois de concluído). Se isso gerar divergência de conciliação, o merchant deve acionar o time comercial (BD) da Keeta."]}]},"headings":[{"value":"Cancelamento e Reembolso","id":"4.-order-cancellation","depth":2},{"value":"1. Cancelamento","id":"1-cancelamento","depth":3},{"value":"Códigos de cancelamento (v1.0.7+)","id":"códigos-de-cancelamento-v107","depth":4},{"value":"","id":"_","depth":1},{"value":"2. Reembolso","id":"2-reembolso","depth":3},{"value":"","id":"_-1","depth":1},{"value":"","id":"_-2","depth":1},{"value":"","id":"_-3","depth":1},{"value":"3. Política de transações reversas","id":"3-política-de-transações-reversas","depth":3}],"frontmatter":{"slug":"/apis/opendelivery/development-guides/orders/4.-order-cancellation","seo":{"title":"Cancelamento e Reembolso"}},"lastModified":"2026-11-17T17:49:10.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/apis/opendelivery/development-guides/orders/4.-order-cancellation","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}