Responses are generated using AI and may contain mistakes.
Nova release: Agenda de recebíveis no Dashboard — Veja no Dashboard quanto você tem a receber em cada dia dos próximos 90 dias, com a nova Agenda de recebíveis em Financeiro e no detalhe do recebedor. Ver release notes
Captura os cartões pre_authorized de uma Venda criada com capture: false e responde 202 com operation.type: capture. O corpo da requisição é opcional e, quando enviado, deve ser {}: qualquer campo extra devolve 400.
Se a Venda estiver em estado misto (cartões authorized e pre_authorized), a captura atua somente nos cartões restantes e responde 202.
Envie o header X-Idempotency-Key; sem ele a API devolve 422 com invalid_request. Reenviar a mesma chave com o mesmo corpo devolve 202 com o estado atual da Venda.
Casos de 409:
idempotency_key_payload_mismatch: a chave já foi usada com outro corpo ou em outra operação.
purchase_invalid_state: a Venda foi criada com capture: true (a captura é automática), não está pending ou não tem cartões pre_authorized.
purchase_operation_in_progress: já existe uma operação em andamento e você enviou uma chave nova.
Captura aceita. A resposta traz a Venda e operation com type: capture e status: pending. Numa repetição idempotente, a operação pode já estar processing
Operação pending ou processing em andamento na Venda (a mais recente). Omitido quando não há operação ativa. Nas respostas 202, a operação aceita vem em operation
Operação assíncrona aceita por esta chamada. Na criação, vem com type: authorize e pode ser omitida numa repetição idempotente
Show child attributes
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Malga","description":"Documentação da Malga: API REST, SDKs, métodos de pagamento, provedores e referência OpenAPI para orquestração de pagamentos.","colors":{"primary":"#2FAC9B","light":"#39BFAD","dark":"#257C70"},"logo":{"light":"https://mintcdn.com/malga/vYWnjE_PEfqgCqeH/logo/light.svg?fit=max\u0026auto=format\u0026n=vYWnjE_PEfqgCqeH\u0026q=85\u0026s=60c63b525307d9a355741f58c18f3420","dark":"https://mintcdn.com/malga/Hsm6lJPRMWAJPkG-/logo/wordmark-white.svg?fit=max\u0026auto=format\u0026n=Hsm6lJPRMWAJPkG-\u0026q=85\u0026s=ea50ce46c10489c67470715f235e1bf0","href":"https://docs.malga.io"},"favicon":"https://mintcdn.com/malga/vYWnjE_PEfqgCqeH/logo/malga.svg?fit=max\u0026auto=format\u0026n=vYWnjE_PEfqgCqeH\u0026q=85\u0026s=d532b4d127383a206703b91b519fd67a","api":{"openapi":["api-reference/api-spec.yaml"],"playground":{"display":"interactive"},"examples":{"languages":["curl","javascript","go"],"prefill":true}},"navbar":{"primary":{"type":"button","label":"Quero testar","href":"https://malga.io/contato"}},"footer":{"socials":{"youtube":"https://www.youtube.com/@gomalga","linkedin":"https://www.linkedin.com/company/gomalga","instagram":"https://www.instagram.com/gomalga"},"links":[{"header":"Produto","items":[{"label":"Dashboard","href":"https://dashboard.malga.io/"},{"label":"Status","href":"https://status.malga.io/"}]},{"header":"Documentação","items":[{"label":"Introdução","href":"/documentations/welcome/introduction"},{"label":"Primeiros passos","href":"/documentations/welcome/primeiros-passos"},{"label":"Referência da API","href":"/api-reference/about-apis"},{"label":"SDKs","href":"/sdks/intro-sdk"},{"label":"Release Notes","href":"/release-notes/releases"}]},{"header":"Empresa","items":[{"label":"Site Malga","href":"https://malga.io"},{"label":"Contato","href":"https://malga.io/contato"}]}]},"search":{"prompt":"Pesquise ou pergunte algo..."},"seo":{"metatags":{"og:site_name":"Malga Docs","og:locale":"pt_BR"},"organization":{"name":"Malga","url":"https://malga.io","logo":"https://docs.malga.io/logo/light.svg","sameAs":["https://www.youtube.com/@gomalga","https://www.linkedin.com/company/gomalga/","https://www.instagram.com/gomalga"]},"indexing":"navigable"},"fonts":{"family":"Inter"},"integrations":{"amplitude":{"apiKey":"f26848c73ccd2e9606c95dac0cf0e765"},"ga4":{"measurementId":"G-RBZL7T96QN"},"hotjar":{"hjid":"2305294","hjsv":"6"}},"banner":{"content":"Nova release: **Agenda de recebíveis no Dashboard** — Veja no Dashboard quanto você tem a receber em cada dia dos próximos 90 dias, com a nova Agenda de recebíveis em Financeiro e no detalhe do recebedor. [Ver release notes](/release-notes/2026-10-29-Release-Notes)","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"thumbnails":{"appearance":"dark","background":"https://mintcdn.com/malga/Hsm6lJPRMWAJPkG-/images/og-background.png?fit=max\u0026auto=format\u0026n=Hsm6lJPRMWAJPkG-\u0026q=85\u0026s=0acfaa17c5dd44e8c7d07b15292eed66","fonts":{"family":"Inter"}},"markdown":{"instructions":["Responda em português brasileiro, na segunda pessoa (\"você\"), com base na documentação Malga.","Não invente endpoints, parâmetros, status codes ou comportamentos de API. Se não estiver na docs, diga que não encontrou e indique a página mais próxima.","Use os headers X-Client-Id e X-Api-Key nos exemplos de autenticação.","Motor de Assinaturas refere-se a /v1/subscriptions* (cycles, trial, retentativas, webhooks subscription.*). Não chame de \"motor de recorrência\".","Recorrência (provedor) é paymentMethod.recurrence em POST /v1/charges (initial / subsequent / unscheduled), distinto do Motor de Assinaturas.","Sandbox é ambiente de testes e não afeta produção."]},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Dashboard","icon":"table-layout","href":"https://dashboard.malga.io/"},{"anchor":"YouTube","icon":"youtube","href":"https://www.youtube.com/@gomalga"},{"anchor":"Status Page","icon":"signal-strong","href":"https://status.malga.io/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"malga","hasAudioNarration":false,"actualSubdomain":"malga","customDomains":["docs.malga.io"],"gitSource":{"type":"github","owner":"plughacker","repo":"malga-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"DISABLED"},"CONTEXTUAL_FEEDBACK":{"status":"DISABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aee17dbc4d3884ebadf32e7","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Documentação","count":190},{"language":"default","tag":"Release Notes","count":176},{"language":"default","tag":"Referência da API","count":107},{"language":"default","tag":"SDKs","count":66},{"language":"default","tag":"Conexões","count":53},{"language":"default","tag":"Guias","count":47},{"language":"default","tag":"API SDKs","count":46},{"language":"default","tag":"Analytics","count":39},{"language":"default","tag":"Analytics API","count":39},{"language":"default","tag":"Serviços adicionais","count":38}]},"assistantConfig":{"enableStarterQuestions":false},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":".card a:not(.card){border-bottom:1.5px solid #C3F4EF;;font-weight:600}.card a:not(.card):hover{border-bottom:2px solid #C3F4EF;;}html:not(.dark) .card a:not(.card){color:var(--tw-prose-links);min-width:1em!important}:root{--malgreen-200: #BAE7C9;--malgreen-300: #38BFAD;--malgreen-400: #2FAC9B;--malblack-100: #666666;--malblack-200: #4D4D4D;--malblack-300: #333333;--malblack-400: #1A1A1A;--malwhite-100: #FFFFFF;--malwhite-200: #F9F9F9;--malwhite-300: #F1F1F1;--malwhite-500: #CBCBCB;--malred-200: #FFA4B3;--malinfo-100: #E1EEF4;--malinfo-300: #3C8DDD;--malinfo-400: #1e61b6;--malsuccess-100: #e4f2e8;--malsuccess-200: #bae7c9;--malsuccess-300: #00ae42;--malsuccess-400: #009033;--malsuccess-500: #00601B;--malwarning-100: #FFF8E6;--malwarning-200: #F9DF8D;--malwarning-300: #FFA400;--malwarning-400: #F0941A;--malwarning-500: #D47129;--malerror-100: #ffd2dc;--post-bg: #3C8DDD;--get-bg: #009033;--patch-bg: #F0941B;--delete-bg: #D12E2d}html:not(.dark) .text-gray-900,html:not(.dark) .text-gray-800,html:not(.dark) .text-gray-700{color:var(--malblack-400)}.text-primary{color:var(--malgreen-400)}.prose :where(h1,h2,h3,h4,h5,h6):not(:where([class~=not-prose] *)){color:var(--malblack-400)}.prose :where(h1,h2,h3,h4,h5,h6):where([class=dark] *):not(:where([class~=not-prose] *)){color:var(--malwhite-200)}.prose :where(thead th):not(:where([class~=not-prose] *)){color:var(--malblack-100)}:is(.dark .prose :where(thead th):not(:where([class~=not-prose] *))){color:var(--malwhite-500)}:is(.dark .prose :is(h1,h2,h3,h4,h5,h6)){color:var(--malwhite-200)}html:not(.dark) .text-gray-600{color:var(--malblack-200)}html:not(.dark) .text-gray-500{color:var(--malblack-100)}.text-gray-200{color:var(--malwhite-200)}.text-gray-400{color:var(--malwhite-500)}.z-10{color:var(--malgreen-300)}.prose{color:var(--malblack-100)}:is(.dark .prose){color:var(--malwhite-500)}:is(.dark .dark\\:text-gray-200){color:var(--malwhite-200)}:is(.dark .dark\\:text-gray-400){color:var(--malwhite-500)}:is(.dark .dark\\:text-primary-light){--tw-text-opacity: 1;color:var(--malgreen-300)}:is(.dark #topbar-cta-button .dark\\:bg-primary-light\\/10){background-color:var(--malgreen-400)}#navbar .text-gray-600{color:var(--malblack-100)}#sidebar li .text-gray-600{color:var(--malblack-100)}#sidebar li .text-gray-700{color:var(--malblack-100)}#sidebar li .bg-primary\\/10{background-color:rgba(47, 172, 155, 0.1);color:var(--malgreen-400)}:is(.dark #sidebar li .text-gray-600){color:var(--malwhite-500)!important}:is(.dark #sidebar .dark\\:text-gray-200){color:var(--malwhite-300)}:is(.dark #sidebar li .text-gray-700){color:var(--malwhite-500)!important}:is(.dark #navbar .dark\\:text-gray-400){color:var(--malwhite-500)!important}:is(.dark #navbar .dark\\:text-primary-light){color:var(--malwhite-100)}:is(.dark #table-of-contents .text-primary){color:var(--malgreen-400)}.card .text-gray-600{color:var(--malblack-100)}:is(.dark .card .dark\\:text-gray-400){color:var(--malwhite-500)}:is(.dark .card h2){color:var(--malwhite-200)}.method-nav-pill{width:2.5rem;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}.method-nav-pill>span{display:inline-flex;align-items:center;justify-content:center;width:100%;box-sizing:border-box;text-align:center}.bg-\\[\\#3064E3\\]{background-color:var(--malinfo-400);color:var(--malwhite-100)}:is(.dark .bg-\\[\\#3064E3\\]){background-color:var(--malinfo-300)}.text-white{color:var(--malwhite-100)}:is(.dark .dark\\:bg-blue-400\\/20){color:var(--malinfo-300)}html:not(.dark) .bg-blue-400\\/20{background-color:var(--malinfo-100);color:var(--malinfo-400)}html:not(.dark) .bg-green-400\\/20{background-color:var(--malsuccess-100);color:var(--get-bg)}:is(.dark .dark\\:text-green-400){color:var(--malsuccess-300)}html:not(.dark) .bg-orange-400\\/20{background-color:var(--malwarning-100);color:var(--patch-bg)}:is(.dark .dark\\:text-orange-400){color:var(--malwarning-300)}html:not(.dark) .bg-red-400\\/20{background-color:var(--malerror-100);color:var(--delete-bg)}:is(.dark .dark\\:text-red-400){color:var(--malred-200)}:is(.dark .dark\\:bg-primary-light){background-color:var(--malgreen-400)}.stroke-gray-400{stroke:var(--malgreen-400)}:is(.dark svg.text-emerald-600){color:var(--malsuccess-200)}:is(.dark .dark\\:text-emerald-200){color:var(--malsuccess-200)}:is(.dark .dark\\:text-amber-200){color:var(--malwarning-200)}:is(.dark svg.text-amber-400){stroke:var(--malwarning-300)}.malga-icon-box .malga-icon[id=\"sodexo\"],.malga-icon-box .malga-icon[id=\"visa\"],.malga-icon-box .malga-icon[id=\"master\"],.malga-icon-box .malga-icon[id=\"amex\"],.malga-icon-box .malga-icon[id=\"dinners\"],.malga-icon-box .malga-icon[id=\"discover\"],.malga-icon-box .malga-icon[id=\"jcb\"],.malga-icon-box .malga-icon[id=\"vr\"],.malga-icon-box .malga-icon[id=\"elo\"]{width:55px!important;height:55px!important}.prose tbody tr:nth-child(odd){background-color:var(--malwhite-200)}:is(.dark .prose tbody tr:nth-child(odd)){background-color:var(--malblack-400)}td:is(:first-child){padding-left:8px}td:is(:last-child){padding-right:8px}td{vertical-align:middle!important}td[align=\"center\"]{text-align:center;vertical-align:middle!important}td[align=\"left\"]{text-align:left;vertical-align:middle!important}td[align=\"right\"]{text-align:right;vertical-align:middle!important}td>span{height:36px!important}th{white-space:nowrap}:is(.dark .prose :where(.malga-check-badge):not(:where([class~=not-prose] *))){background-color:var(--malblack-300)}.malga-check-badge{height:fit-content;white-space:nowrap}.check-icon>p{margin:0!important}.table-legend>p{font-size:12px;margin:0}.mx-1{margin:0 1em}.prose :where(img.table-flow-view){margin-top:0em;margin-bottom:0em;margin-inline:auto}.providers-matrix{--providers-matrix-sticky-bg: rgb(var(--background-light, 255 255 255));--providers-matrix-fade: rgb(var(--background-light, 255 255 255));--providers-matrix-sticky-shadow: rgb(0 0 0 / 0.06);margin-bottom:1.5rem;max-width:100%;min-width:0;box-sizing:border-box}:is(.dark .providers-matrix){--providers-matrix-sticky-bg: rgb(var(--background-dark, 10 13 14));--providers-matrix-fade: rgb(var(--background-dark, 10 13 14));--providers-matrix-sticky-shadow: rgb(0 0 0 / 0.45)}.providers-matrix-top-scroll{position:sticky;top:7.5rem;z-index:5;overflow-x:auto;overflow-y:hidden;width:100%;max-width:100%;min-width:0;box-sizing:border-box;margin-top:0.25rem;margin-bottom:1rem;min-height:12px;background:transparent;border:0;border-radius:0;scrollbar-width:thin;scrollbar-color:var(--malblack-100) transparent}.providers-matrix-top-scroll[data-overflow-x=\"false\"]{display:none}:is(.dark .providers-matrix-top-scroll){scrollbar-color:var(--malblack-100) transparent}.providers-matrix-top-scroll-inner{height:1px;pointer-events:none}.providers-matrix-viewport{position:relative;width:100%;max-width:100%;min-width:0}.providers-matrix-viewport::after{content:\"\";position:absolute;top:0;bottom:8px;right:0;width:1.25rem;z-index:4;pointer-events:none;opacity:0;transition:opacity 120ms ease;background:linear-gradient(to left, var(--providers-matrix-fade), transparent)}.providers-matrix-viewport[data-overflow-right=\"true\"]::after{opacity:1}.providers-matrix-scroll{overflow-x:auto;overflow-y:hidden;width:100%;max-width:100%;min-width:0;box-sizing:border-box;border:0;border-radius:0;background:transparent;scrollbar-width:thin;scrollbar-color:var(--malblack-100) transparent}.providers-matrix-top-scroll::-webkit-scrollbar,.providers-matrix-scroll::-webkit-scrollbar{height:8px}.providers-matrix-top-scroll::-webkit-scrollbar-track,.providers-matrix-scroll::-webkit-scrollbar-track{background:transparent}.providers-matrix-top-scroll::-webkit-scrollbar-thumb,.providers-matrix-scroll::-webkit-scrollbar-thumb{background:var(--malblack-100);border-radius:999px}.providers-matrix-top-scroll::-webkit-scrollbar-thumb:hover,.providers-matrix-scroll::-webkit-scrollbar-thumb:hover{background:var(--malgreen-300)}.providers-matrix-scroll table{margin-top:0!important;margin-bottom:0!important;width:max-content!important;min-width:0!important;max-width:none!important;background:transparent;display:table!important;overflow:visible!important}.providers-matrix-scroll th,.providers-matrix-scroll td{min-width:0!important}.providers-matrix-scroll[data-overflow-x=\"true\"]{overflow-x:scroll}.providers-matrix-scroll th:first-child,.providers-matrix-scroll td:first-child{position:sticky;left:0;z-index:2;min-width:11rem!important;background-color:var(--providers-matrix-sticky-bg);box-shadow:4px 0 8px -6px var(--providers-matrix-sticky-shadow)}.providers-matrix-scroll tbody tr:nth-child(odd) td:first-child{background-color:var(--malwhite-200)}:is(.dark .providers-matrix-scroll tbody tr:nth-child(odd) td:first-child){background-color:var(--malblack-400)}.providers-matrix-scroll thead th:first-child{z-index:3}"}],"page":{"pagePath":"api-reference/purchases/capturar-venda-pre-autorizada","slug":"/api-reference/purchases/capturar-venda-pre-autorizada","pageMetadata":{"openapi":"post /v1/purchases/{id}/capture","title":"Capturar uma Venda pré-autorizada","description":"Captura os cartões `pre_authorized` de uma Venda criada com `capture: false` e responde `202` com `operation.type: capture`. O corpo da requisição é opcional e, quando enviado, deve ser `{}`: qualquer campo extra devolve `400`.\n\nSe a Venda estiver em estado misto (cartões `authorized` e `pre_authorized`), a captura atua somente nos cartões restantes e responde `202`.\n\nEnvie o header `X-Idempotency-Key`; sem ele a API devolve `422` com `invalid_request`. Reenviar a mesma chave com o mesmo corpo devolve `202` com o estado atual da Venda.\n\nCasos de `409`:\n\n- `idempotency_key_payload_mismatch`: a chave já foi usada com outro corpo ou em outra operação.\n- `purchase_invalid_state`: a Venda foi criada com `capture: true` (a captura é automática), não está `pending` ou não tem cartões `pre_authorized`.\n- `purchase_operation_in_progress`: já existe uma operação em andamento e você enviou uma chave nova.\n","href":"/api-reference/purchases/capturar-venda-pre-autorizada"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Captura os cartões \", _jsx(_components.code, {\n children: \"pre_authorized\"\n }), \" de uma Venda criada com \", _jsx(_components.code, {\n children: \"capture: false\"\n }), \" e responde \", _jsx(_components.code, {\n children: \"202\"\n }), \" com \", _jsx(_components.code, {\n children: \"operation.type: capture\"\n }), \". O corpo da requisição é opcional e, quando enviado, deve ser \", _jsx(_components.code, {\n children: \"{}\"\n }), \": qualquer campo extra devolve \", _jsx(_components.code, {\n children: \"400\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Se a Venda estiver em estado misto (cartões \", _jsx(_components.code, {\n children: \"authorized\"\n }), \" e \", _jsx(_components.code, {\n children: \"pre_authorized\"\n }), \"), a captura atua somente nos cartões restantes e responde \", _jsx(_components.code, {\n children: \"202\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Envie o header \", _jsx(_components.code, {\n children: \"X-Idempotency-Key\"\n }), \"; sem ele a API devolve \", _jsx(_components.code, {\n children: \"422\"\n }), \" com \", _jsx(_components.code, {\n children: \"invalid_request\"\n }), \". Reenviar a mesma chave com o mesmo corpo devolve \", _jsx(_components.code, {\n children: \"202\"\n }), \" com o estado atual da Venda.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Casos de \", _jsx(_components.code, {\n children: \"409\"\n }), \":\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"idempotency_key_payload_mismatch\"\n }), \": a chave já foi usada com outro corpo ou em outra operação.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"purchase_invalid_state\"\n }), \": a Venda foi criada com \", _jsx(_components.code, {\n children: \"capture: true\"\n }), \" (a captura é automática), não está \", _jsx(_components.code, {\n children: \"pending\"\n }), \" ou não tem cartões \", _jsx(_components.code, {\n children: \"pre_authorized\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"purchase_operation_in_progress\"\n }), \": já existe uma operação em andamento e você enviou uma chave nova.\"]\n }), \"\\n\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"openapi":"post /v1/purchases/{id}/capture","title":"Capturar uma Venda pré-autorizada","description":"Captura os cartões `pre_authorized` de uma Venda criada com `capture: false` e responde `202` com `operation.type: capture`. O corpo da requisição é opcional e, quando enviado, deve ser `{}`: qualquer campo extra devolve `400`.\n\nSe a Venda estiver em estado misto (cartões `authorized` e `pre_authorized`), a captura atua somente nos cartões restantes e responde `202`.\n\nEnvie o header `X-Idempotency-Key`; sem ele a API devolve `422` com `invalid_request`. Reenviar a mesma chave com o mesmo corpo devolve `202` com o estado atual da Venda.\n\nCasos de `409`:\n\n- `idempotency_key_payload_mismatch`: a chave já foi usada com outro corpo ou em outra operação.\n- `purchase_invalid_state`: a Venda foi criada com `capture: true` (a captura é automática), não está `pending` ou não tem cartões `pre_authorized`.\n- `purchase_operation_in_progress`: já existe uma operação em andamento e você enviou uma chave nova.\n","href":"/api-reference/purchases/capturar-venda-pre-autorizada"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/malga/e062f6bdf470a4a7/scripts/generate-providers/generate-providers-docs.js","/_mintlify/custom/malga/1d6eb6c3defb1781/scripts/generate-providers/generate-providers-table.js","/_mintlify/custom/malga/511878d47a4717b9/scripts/generate-providers/index.js","/_mintlify/custom/malga/07cc1cd1c4f6158b/scripts/generate-providers/update-mint-file.js","/_mintlify/custom/malga/4789795b14062ad2/scripts/generate-providers/utils.js","/_mintlify/custom/malga/f193bde54c02ce17/script.js"],"openApiReferenceData":{"operation":{"summary":"Capturar uma Venda pré-autorizada","operationId":"capturePurchase","description":"Captura os cartões `pre_authorized` de uma Venda criada com `capture: false` e responde `202` com `operation.type: capture`. O corpo da requisição é opcional e, quando enviado, deve ser `{}`: qualquer campo extra devolve `400`.\n\nSe a Venda estiver em estado misto (cartões `authorized` e `pre_authorized`), a captura atua somente nos cartões restantes e responde `202`.\n\nEnvie o header `X-Idempotency-Key`; sem ele a API devolve `422` com `invalid_request`. Reenviar a mesma chave com o mesmo corpo devolve `202` com o estado atual da Venda.\n\nCasos de `409`:\n\n- `idempotency_key_payload_mismatch`: a chave já foi usada com outro corpo ou em outra operação.\n- `purchase_invalid_state`: a Venda foi criada com `capture: true` (a captura é automática), não está `pending` ou não tem cartões `pre_authorized`.\n- `purchase_operation_in_progress`: já existe uma operação em andamento e você enviou uma chave nova.\n","tags":["Purchases"],"parameters":["4e7896d5-4bca-429e-b560-311adce76619","e7904ffb-025e-4c34-8160-eb53d14bca92"],"requestBody":"a7b98de6-3bed-4a97-af72-55dd602bb66c","responses":{"202":"f0a7bcaf-301b-4347-9b91-c84c0533ab54","400":"4054cea6-16bc-4022-b3e1-12f62f862a49","401":"ef6082a7-7f49-4f2b-94e2-737d19aa562a","404":"3faa530e-d9e3-47f5-9c9e-8136b016a4f7","408":"b931047d-af77-4a3a-aa0b-54aa89ad34d5","409":"32387119-fb31-4cac-8836-1014bfde1f1d","422":"efb69fd5-b458-4829-92b4-aef4a3374141"},"method":"post","type":"path","servers":["0676cd94-979e-48df-aa0c-bd30e3ec97a0"],"security":["7dd845ab-8a55-4088-a4c9-7ec907c7e310"],"path":"/v1/purchases/{id}/capture","baseUrlOptions":["https://api.malga.io"],"title":"Capturar uma Venda pré-autorizada","codeSamples":[],"requestExampleLanguages":["bash","javascript","go"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{}]},"dependencies":{"parameters":{"4e7896d5-4bca-429e-b560-311adce76619":{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid","isRequired":true,"description":"Identificador da Venda","uniqueKey":"","typeLabel":"string\u003cuuid>"},"description":"Identificador da Venda","example":"1c6381d1-9fcd-4e9a-a012-93cf0457dcb9"},"e7904ffb-025e-4c34-8160-eb53d14bca92":{"in":"header","name":"X-Idempotency-Key","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"isRequired":true,"description":"Chave de idempotência da captura","uniqueKey":"","typeLabel":"string"},"description":"Chave de idempotência da captura","example":"captura-pedido-1001-attempt-1"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"description":"Corpo vazio","uniqueKey":"","typeLabel":"object"},"examples":{"EmptyBody":{"title":"EmptyBody","value":{}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"f0a7bcaf-301b-4347-9b91-c84c0533ab54":{"description":"Captura aceita. A resposta traz a Venda e `operation` com `type: capture` e `status: pending`. Numa repetição idempotente, a operação pode já estar `processing`","content":{"application/json":{"schema":{"type":"object","description":"Venda paga com 2 ou 3 cartões","required":["id","merchantId","amount","currency","capture","status","payments","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid","description":"Identificador da Venda","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"merchantId":{"type":"string","format":"uuid","description":"Identificador do merchant da Venda","isRequired":true,"uniqueKey":"merchantId","typeLabel":"string\u003cuuid>"},"amount":{"type":"integer","minimum":200,"description":"Valor total da Venda em centavos","isRequired":true,"uniqueKey":"amount","typeLabel":"integer"},"currency":{"type":"string","enum":["BRL"],"isRequired":true,"uniqueKey":"currency","typeLabel":"enum\u003cstring>"},"capture":{"type":"boolean","description":"Indica o modo de captura informado na criação. `false` exige captura explícita; `true` captura automaticamente","isRequired":true,"uniqueKey":"capture","typeLabel":"boolean"},"status":{"type":"string","description":"Status da Venda","enum":["pending","paid","failed","cancelled"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"payments":{"type":"array","minItems":2,"maxItems":3,"items":{"type":"object","description":"Estado de um cartão da Venda","required":["slotIndex","amount","paymentMethod","status","refundedAmount","paymentSource"],"additionalProperties":false,"properties":{"slotIndex":{"type":"integer","minimum":0,"maximum":2,"description":"Posição do cartão na Venda, a partir de 0. A Malga processa os cartões nessa ordem","isRequired":true,"uniqueKey":"payments.items.[INDEX].slotIndex","typeLabel":"integer"},"amount":{"type":"integer","minimum":100,"description":"Valor do cartão em centavos","isRequired":true,"uniqueKey":"payments.items.[INDEX].amount","typeLabel":"integer"},"paymentMethod":{"type":"object","description":"Meio de pagamento do cartão. Somente crédito","required":["paymentType","installments"],"additionalProperties":false,"properties":{"paymentType":{"type":"string","enum":["credit"],"description":"Tipo de pagamento. Somente `credit`","isRequired":true,"uniqueKey":"payments.items.[INDEX].paymentMethod.paymentType","typeLabel":"enum\u003cstring>"},"installments":{"type":"integer","minimum":1,"description":"Número de parcelas deste cartão","isRequired":true,"uniqueKey":"payments.items.[INDEX].paymentMethod.installments","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"payments.items.[INDEX].paymentMethod","typeLabel":"object"},"status":{"type":"string","description":"Status de um cartão da Venda. `authorized` indica cartão capturado","enum":["pending","processing","undetermined","pre_authorized","authorized","failed","voided","canceled","charged_back"],"isRequired":true,"uniqueKey":"payments.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"refundedAmount":{"type":"integer","minimum":0,"description":"Valor já estornado neste cartão, em centavos","isRequired":true,"uniqueKey":"payments.items.[INDEX].refundedAmount","typeLabel":"integer"},"paymentSource":{"type":"object","description":"Referência do cartão usada na Venda","additionalProperties":false,"properties":{"sourceType":{"type":"string","enum":["card","token"],"uniqueKey":"payments.items.[INDEX].paymentSource.sourceType","typeLabel":"enum\u003cstring>"},"cardId":{"type":"string","format":"uuid","uniqueKey":"payments.items.[INDEX].paymentSource.cardId","typeLabel":"string\u003cuuid>"},"tokenId":{"type":"string","format":"uuid","uniqueKey":"payments.items.[INDEX].paymentSource.tokenId","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"payments.items.[INDEX].paymentSource","typeLabel":"object"},"chargeId":{"oneOf":[{"type":"string","format":"uuid","description":"Identificador da cobrança deste cartão. Omitido ou `null` enquanto a cobrança não foi criada","uniqueKey":"payments.items.[INDEX].chargeId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Identificador da cobrança deste cartão. Omitido ou `null` enquanto a cobrança não foi criada","uniqueKey":"payments.items.[INDEX].chargeId.oneOf.1","typeLabel":"null"}],"uniqueKey":"payments.items.[INDEX].chargeId","typeLabel":"string\u003cuuid> | null"},"declineReason":{"type":"string","description":"Código de recusa do cartão, sem mensagem livre. Omitido quando não há recusa. O código vem da [tabela de códigos de recusa](/documentations/type-tables/declined-code), como `generic`, `invalid_cvv` ou `expired_card`, ou da própria Malga, como `merchant_not_owned`, quando o `merchantId` informado não pertence ao seu cliente","example":"invalid_cvv","uniqueKey":"payments.items.[INDEX].declineReason","typeLabel":"string"},"card":{"type":"object","additionalProperties":false,"description":"Bandeira e últimos quatro dígitos do cartão. Não contém o número completo","properties":{"brand":{"type":"string","example":"Visa","uniqueKey":"payments.items.[INDEX].card.brand","typeLabel":"string"},"last4":{"type":"string","pattern":"^[0-9]{4}$","example":"4242","uniqueKey":"payments.items.[INDEX].card.last4","typeLabel":"string"}},"uniqueKey":"payments.items.[INDEX].card","typeLabel":"object"},"splitRules":{"type":"array","description":"Parcela das regras de split correspondente a este cartão. Omitido quando a criação não enviou split","items":{"type":"object","description":"Regra de split da Venda. Informe `percentage` ou `amount` em cada regra, nunca os dois. A API valida a soma: os percentuais somados não passam de 100 e os valores fixos somados não passam do `amount` da Venda. Fora disso, devolve `422` com `invalid_request`. Não há limite por regra além dessas somas.\n","required":["sellerId"],"additionalProperties":false,"properties":{"sellerId":{"type":"string","format":"uuid","description":"Identificador do seller recebedor","isRequired":true,"uniqueKey":"payments.items.[INDEX].splitRules.items.[INDEX].sellerId","typeLabel":"string\u003cuuid>"},"percentage":{"type":"number","description":"Percentual da Venda destinado ao seller","uniqueKey":"payments.items.[INDEX].splitRules.items.[INDEX].percentage","typeLabel":"number"},"amount":{"type":"integer","description":"Valor fixo em centavos destinado ao seller","uniqueKey":"payments.items.[INDEX].splitRules.items.[INDEX].amount","typeLabel":"integer"},"processingFee":{"type":"boolean","default":false,"description":"Indica se o seller arca com a taxa de processamento","uniqueKey":"payments.items.[INDEX].splitRules.items.[INDEX].processingFee","typeLabel":"boolean"},"chargeEntireFee":{"type":"boolean","description":"Indica se o seller arca com a taxa integral","uniqueKey":"payments.items.[INDEX].splitRules.items.[INDEX].chargeEntireFee","typeLabel":"boolean"},"transactionOwner":{"type":"boolean","description":"Indica se o seller é o dono da transação","uniqueKey":"payments.items.[INDEX].splitRules.items.[INDEX].transactionOwner","typeLabel":"boolean"},"chargeRemainderFee":{"type":"boolean","description":"Indica se o seller arca com o restante da taxa","uniqueKey":"payments.items.[INDEX].splitRules.items.[INDEX].chargeRemainderFee","typeLabel":"boolean"},"liable":{"type":"boolean","default":false,"description":"Indica se o seller é responsável por chargebacks","uniqueKey":"payments.items.[INDEX].splitRules.items.[INDEX].liable","typeLabel":"boolean"},"fares":{"type":"object","description":"Taxas opcionais da regra de split","additionalProperties":false,"properties":{"mdr":{"type":"number","description":"MDR aplicado ao recebedor","uniqueKey":"payments.items.[INDEX].splitRules.items.[INDEX].fares.mdr","typeLabel":"number"},"fee":{"type":"integer","description":"Taxa fixa aplicada ao recebedor","uniqueKey":"payments.items.[INDEX].splitRules.items.[INDEX].fares.fee","typeLabel":"integer"}},"uniqueKey":"payments.items.[INDEX].splitRules.items.[INDEX].fares","typeLabel":"object"}},"uniqueKey":"payments.items.[INDEX].splitRules.items.[INDEX]","typeLabel":"object"},"uniqueKey":"payments.items.[INDEX].splitRules","typeLabel":"object[]"}},"uniqueKey":"payments.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"payments","typeLabel":"object[]"},"createdAt":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"createdAt","typeLabel":"string\u003cdate-time>"},"updatedAt":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"updatedAt","typeLabel":"string\u003cdate-time>"},"pendingReview":{"type":"object","required":["reason","since"],"additionalProperties":false,"description":"Sinal de que a Venda precisa de revisão. A Venda permanece `pending` e você deve interromper o polling automático","properties":{"reason":{"type":"string","enum":["reconciliation_failed","amount_mismatch","claims_exhausted"],"description":"Motivo da anomalia","isRequired":true,"uniqueKey":"pendingReview.reason","typeLabel":"enum\u003cstring>"},"since":{"type":"string","format":"date-time","description":"Instante em que a anomalia foi registrada","isRequired":true,"uniqueKey":"pendingReview.since","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"pendingReview","typeLabel":"object"},"activeOperation":{"type":"object","description":"Operação `pending` ou `processing` em andamento na Venda (a mais recente). Omitido quando não há operação ativa. Nas respostas `202`, a operação aceita vem em `operation`","required":["id","type","status"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid","description":"Identificador da operação","isRequired":true,"uniqueKey":"activeOperation.id","typeLabel":"string\u003cuuid>"},"type":{"type":"string","description":"Tipo da operação assíncrona. `rollback` é a compensação automática de uma captura interrompida","enum":["authorize","rollback","capture","void","refund"],"isRequired":true,"uniqueKey":"activeOperation.type","typeLabel":"enum\u003cstring>"},"status":{"type":"string","description":"Status da operação assíncrona","enum":["pending","processing","completed","failed"],"isRequired":true,"uniqueKey":"activeOperation.status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"activeOperation","typeLabel":"object"},"orderId":{"oneOf":[{"type":"string","description":"Identificador do pedido no seu sistema","uniqueKey":"orderId.oneOf.0","typeLabel":"string"},{"type":"null","description":"Identificador do pedido no seu sistema","uniqueKey":"orderId.oneOf.1","typeLabel":"null"}],"uniqueKey":"orderId","typeLabel":"string | null"},"sessionId":{"oneOf":[{"type":"string","format":"uuid","description":"Session de origem informada na criação","uniqueKey":"sessionId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Session de origem informada na criação","uniqueKey":"sessionId.oneOf.1","typeLabel":"null"}],"uniqueKey":"sessionId","typeLabel":"string\u003cuuid> | null"},"customerId":{"type":"string","format":"uuid","description":"Customer informado na criação. Omitido quando a Venda não tem customer","uniqueKey":"customerId","typeLabel":"string\u003cuuid>"},"metadata":{"type":"object","additionalProperties":true,"description":"Metadados informados na criação. Omitido quando não enviados","uniqueKey":"metadata","typeLabel":"object"},"splitRules":{"type":"array","description":"Regras de split informadas na criação. Omitido quando não enviadas","items":{"type":"object","description":"Regra de split da Venda. Informe `percentage` ou `amount` em cada regra, nunca os dois. A API valida a soma: os percentuais somados não passam de 100 e os valores fixos somados não passam do `amount` da Venda. Fora disso, devolve `422` com `invalid_request`. Não há limite por regra além dessas somas.\n","required":["sellerId"],"additionalProperties":false,"properties":{"sellerId":{"type":"string","format":"uuid","description":"Identificador do seller recebedor","isRequired":true,"uniqueKey":"splitRules.items.[INDEX].sellerId","typeLabel":"string\u003cuuid>"},"percentage":{"type":"number","description":"Percentual da Venda destinado ao seller","uniqueKey":"splitRules.items.[INDEX].percentage","typeLabel":"number"},"amount":{"type":"integer","description":"Valor fixo em centavos destinado ao seller","uniqueKey":"splitRules.items.[INDEX].amount","typeLabel":"integer"},"processingFee":{"type":"boolean","default":false,"description":"Indica se o seller arca com a taxa de processamento","uniqueKey":"splitRules.items.[INDEX].processingFee","typeLabel":"boolean"},"chargeEntireFee":{"type":"boolean","description":"Indica se o seller arca com a taxa integral","uniqueKey":"splitRules.items.[INDEX].chargeEntireFee","typeLabel":"boolean"},"transactionOwner":{"type":"boolean","description":"Indica se o seller é o dono da transação","uniqueKey":"splitRules.items.[INDEX].transactionOwner","typeLabel":"boolean"},"chargeRemainderFee":{"type":"boolean","description":"Indica se o seller arca com o restante da taxa","uniqueKey":"splitRules.items.[INDEX].chargeRemainderFee","typeLabel":"boolean"},"liable":{"type":"boolean","default":false,"description":"Indica se o seller é responsável por chargebacks","uniqueKey":"splitRules.items.[INDEX].liable","typeLabel":"boolean"},"fares":{"type":"object","description":"Taxas opcionais da regra de split","additionalProperties":false,"properties":{"mdr":{"type":"number","description":"MDR aplicado ao recebedor","uniqueKey":"splitRules.items.[INDEX].fares.mdr","typeLabel":"number"},"fee":{"type":"integer","description":"Taxa fixa aplicada ao recebedor","uniqueKey":"splitRules.items.[INDEX].fares.fee","typeLabel":"integer"}},"uniqueKey":"splitRules.items.[INDEX].fares","typeLabel":"object"}},"uniqueKey":"splitRules.items.[INDEX]","typeLabel":"object"},"uniqueKey":"splitRules","typeLabel":"object[]"},"operation":{"type":"object","description":"Operação assíncrona aceita por esta chamada. Na criação, vem com `type: authorize` e pode ser omitida numa repetição idempotente","required":["id","type","status"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid","description":"Identificador da operação","isRequired":true,"uniqueKey":"operation.id","typeLabel":"string\u003cuuid>"},"type":{"type":"string","description":"Tipo da operação assíncrona. `rollback` é a compensação automática de uma captura interrompida","enum":["authorize","rollback","capture","void","refund"],"isRequired":true,"uniqueKey":"operation.type","typeLabel":"enum\u003cstring>"},"status":{"type":"string","description":"Status da operação assíncrona","enum":["pending","processing","completed","failed"],"isRequired":true,"uniqueKey":"operation.status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"operation","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"PurchaseCaptureAccepted":{"title":"PurchaseCaptureAccepted","value":{"id":"1c6381d1-9fcd-4e9a-a012-93cf0457dcb9","merchantId":"6d5b0464-090b-480b-a4e9-e1a0fb60a495","amount":15000,"currency":"BRL","capture":false,"status":"pending","updatedAt":"2026-07-27T18:05:00Z","payments":[{"slotIndex":0,"amount":10000,"paymentMethod":{"paymentType":"credit","installments":1},"status":"pre_authorized","refundedAmount":0,"chargeId":"b1204633-999d-4cb2-9546-f9b3108b23df","paymentSource":{"sourceType":"card","cardId":"3fd63170-ffa4-4b33-9d45-c3ab8fe6ce61"},"card":{"brand":"Visa","last4":"4242"}},{"slotIndex":1,"amount":5000,"paymentMethod":{"paymentType":"credit","installments":1},"status":"pre_authorized","refundedAmount":0,"chargeId":"13cf9d05-e0d7-4927-ae24-f967258c210a","paymentSource":{"sourceType":"token","tokenId":"c9783dec-0900-401c-8946-58e1b626f85a"},"card":{"brand":"Mastercard","last4":"4444"}}],"createdAt":"2026-07-27T18:00:00Z","operation":{"id":"0bb96a26-fc53-405c-8e3a-21762913f1a0","type":"capture","status":"pending"}}}},"exampleType":"examples"}},"exampleType":"examples"},"4054cea6-16bc-4022-b3e1-12f62f862a49":{"description":"JSON ilegível, campo não previsto no corpo ou parâmetro de query inválido (`limit` acima de 100, UUID de filtro malformado, `status` fora do enum). Regras de negócio, como a quantidade de cartões ou a soma dos valores, devolvem `422`","content":{"application/json":{"schema":{"type":"object","description":"Envelope de erro da API de Vendas","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["type","code","message","details"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["api_error","bad_request","validation_error","not_found","conflict","unauthorized","unavailable"],"description":"Categoria do erro","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"integer","description":"Código HTTP do erro","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","description":"Mensagem resumida do erro","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","description":"Detalhes do erro. Nos erros `404`, `409` e `422`, repete o `businessCode`","items":{"type":"string","uniqueKey":"error.details.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"error.details","typeLabel":"string[]"},"businessCode":{"type":"string","description":"Código de negócio do erro. Presente nos erros `400`, `404`, `409` e `422`; omitido em `401` e `503`. Valores: `invalid_request`, `pan_not_allowed`, `invalid_payments_count`, `payments_amount_mismatch`, `payment_amount_below_minimum`, `currency_not_brl`, `payment_source_required`, `purchase_not_found`, `idempotency_key_payload_mismatch`, `purchase_operation_in_progress`, `purchase_invalid_state` e `purchase_intent_mismatch`.\n","example":"purchase_not_found","uniqueKey":"error.businessCode","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"InvalidBody":{"title":"InvalidBody","value":{"error":{"type":"bad_request","code":400,"message":"Validation error","businessCode":"invalid_request","details":[]}}}},"exampleType":"examples"}},"exampleType":"examples"},"ef6082a7-7f49-4f2b-94e2-737d19aa562a":{"description":"Header `X-Client-Id` ausente, vazio ou inválido. A resposta não traz `businessCode`","content":{"application/json":{"schema":{"type":"object","description":"Envelope de erro da API de Vendas","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["type","code","message","details"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["api_error","bad_request","validation_error","not_found","conflict","unauthorized","unavailable"],"description":"Categoria do erro","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"integer","description":"Código HTTP do erro","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","description":"Mensagem resumida do erro","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","description":"Detalhes do erro. Nos erros `404`, `409` e `422`, repete o `businessCode`","items":{"type":"string","uniqueKey":"error.details.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"error.details","typeLabel":"string[]"},"businessCode":{"type":"string","description":"Código de negócio do erro. Presente nos erros `400`, `404`, `409` e `422`; omitido em `401` e `503`. Valores: `invalid_request`, `pan_not_allowed`, `invalid_payments_count`, `payments_amount_mismatch`, `payment_amount_below_minimum`, `currency_not_brl`, `payment_source_required`, `purchase_not_found`, `idempotency_key_payload_mismatch`, `purchase_operation_in_progress`, `purchase_invalid_state` e `purchase_intent_mismatch`.\n","example":"purchase_not_found","uniqueKey":"error.businessCode","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"MissingClientId":{"title":"MissingClientId","value":{"error":{"type":"unauthorized","code":401,"message":"Unauthorized","details":["unauthorized"]}}}},"exampleType":"examples"}},"exampleType":"examples"},"3faa530e-d9e3-47f5-9c9e-8136b016a4f7":{"description":"Venda inexistente, com `id` malformado ou pertencente a outro cliente. Os três casos devolvem a mesma resposta","content":{"application/json":{"schema":{"type":"object","description":"Envelope de erro da API de Vendas","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["type","code","message","details"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["api_error","bad_request","validation_error","not_found","conflict","unauthorized","unavailable"],"description":"Categoria do erro","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"integer","description":"Código HTTP do erro","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","description":"Mensagem resumida do erro","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","description":"Detalhes do erro. Nos erros `404`, `409` e `422`, repete o `businessCode`","items":{"type":"string","uniqueKey":"error.details.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"error.details","typeLabel":"string[]"},"businessCode":{"type":"string","description":"Código de negócio do erro. Presente nos erros `400`, `404`, `409` e `422`; omitido em `401` e `503`. Valores: `invalid_request`, `pan_not_allowed`, `invalid_payments_count`, `payments_amount_mismatch`, `payment_amount_below_minimum`, `currency_not_brl`, `payment_source_required`, `purchase_not_found`, `idempotency_key_payload_mismatch`, `purchase_operation_in_progress`, `purchase_invalid_state` e `purchase_intent_mismatch`.\n","example":"purchase_not_found","uniqueKey":"error.businessCode","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"PurchaseNotFound":{"title":"PurchaseNotFound","value":{"error":{"type":"not_found","code":404,"message":"Resource not found","businessCode":"purchase_not_found","details":["purchase_not_found"]}}}},"exampleType":"examples"}},"exampleType":"examples"},"b931047d-af77-4a3a-aa0b-54aa89ad34d5":{"description":"A requisição passou do tempo limite de processamento do serviço de Vendas. A resposta não traz `businessCode`","content":{"application/json":{"schema":{"type":"object","description":"Envelope de erro da API de Vendas","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["type","code","message","details"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["api_error","bad_request","validation_error","not_found","conflict","unauthorized","unavailable"],"description":"Categoria do erro","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"integer","description":"Código HTTP do erro","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","description":"Mensagem resumida do erro","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","description":"Detalhes do erro. Nos erros `404`, `409` e `422`, repete o `businessCode`","items":{"type":"string","uniqueKey":"error.details.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"error.details","typeLabel":"string[]"},"businessCode":{"type":"string","description":"Código de negócio do erro. Presente nos erros `400`, `404`, `409` e `422`; omitido em `401` e `503`. Valores: `invalid_request`, `pan_not_allowed`, `invalid_payments_count`, `payments_amount_mismatch`, `payment_amount_below_minimum`, `currency_not_brl`, `payment_source_required`, `purchase_not_found`, `idempotency_key_payload_mismatch`, `purchase_operation_in_progress`, `purchase_invalid_state` e `purchase_intent_mismatch`.\n","example":"purchase_not_found","uniqueKey":"error.businessCode","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"RequestTimeout":{"title":"RequestTimeout","value":{"error":{"type":"api_error","code":408,"message":"Request timeout","details":[]}}}},"exampleType":"examples"}},"exampleType":"examples"},"32387119-fb31-4cac-8836-1014bfde1f1d":{"description":"Conflito de idempotência ou de estado da Venda. `idempotency_key_payload_mismatch` tem precedência sobre `purchase_operation_in_progress` quando os dois se aplicam","content":{"application/json":{"schema":{"type":"object","description":"Envelope de erro da API de Vendas","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["type","code","message","details"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["api_error","bad_request","validation_error","not_found","conflict","unauthorized","unavailable"],"description":"Categoria do erro","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"integer","description":"Código HTTP do erro","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","description":"Mensagem resumida do erro","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","description":"Detalhes do erro. Nos erros `404`, `409` e `422`, repete o `businessCode`","items":{"type":"string","uniqueKey":"error.details.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"error.details","typeLabel":"string[]"},"businessCode":{"type":"string","description":"Código de negócio do erro. Presente nos erros `400`, `404`, `409` e `422`; omitido em `401` e `503`. Valores: `invalid_request`, `pan_not_allowed`, `invalid_payments_count`, `payments_amount_mismatch`, `payment_amount_below_minimum`, `currency_not_brl`, `payment_source_required`, `purchase_not_found`, `idempotency_key_payload_mismatch`, `purchase_operation_in_progress`, `purchase_invalid_state` e `purchase_intent_mismatch`.\n","example":"purchase_not_found","uniqueKey":"error.businessCode","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"IdempotencyKeyPayloadMismatch":{"title":"IdempotencyKeyPayloadMismatch","value":{"error":{"type":"conflict","code":409,"message":"Conflict","businessCode":"idempotency_key_payload_mismatch","details":["idempotency_key_payload_mismatch"]}}},"OperationInProgress":{"title":"OperationInProgress","value":{"error":{"type":"conflict","code":409,"message":"Conflict","businessCode":"purchase_operation_in_progress","details":["purchase_operation_in_progress"]}}},"InvalidState":{"title":"InvalidState","value":{"error":{"type":"conflict","code":409,"message":"Conflict","businessCode":"purchase_invalid_state","details":["purchase_invalid_state"]}}}},"exampleType":"examples"}},"exampleType":"examples"},"efb69fd5-b458-4829-92b4-aef4a3374141":{"description":"Header `X-Idempotency-Key` ausente (`invalid_request`)","content":{"application/json":{"schema":{"type":"object","description":"Envelope de erro da API de Vendas","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["type","code","message","details"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["api_error","bad_request","validation_error","not_found","conflict","unauthorized","unavailable"],"description":"Categoria do erro","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"integer","description":"Código HTTP do erro","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","description":"Mensagem resumida do erro","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","description":"Detalhes do erro. Nos erros `404`, `409` e `422`, repete o `businessCode`","items":{"type":"string","uniqueKey":"error.details.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"error.details","typeLabel":"string[]"},"businessCode":{"type":"string","description":"Código de negócio do erro. Presente nos erros `400`, `404`, `409` e `422`; omitido em `401` e `503`. Valores: `invalid_request`, `pan_not_allowed`, `invalid_payments_count`, `payments_amount_mismatch`, `payment_amount_below_minimum`, `currency_not_brl`, `payment_source_required`, `purchase_not_found`, `idempotency_key_payload_mismatch`, `purchase_operation_in_progress`, `purchase_invalid_state` e `purchase_intent_mismatch`.\n","example":"purchase_not_found","uniqueKey":"error.businessCode","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"MissingIdempotencyKey":{"title":"MissingIdempotencyKey","value":{"error":{"type":"validation_error","code":422,"message":"Validation error","businessCode":"invalid_request","details":["invalid_request"]}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"7dd845ab-8a55-4088-a4c9-7ec907c7e310":{"X-Client-ID":{"type":"apiKey","in":"header","name":"X-Client-Id","scopes":[],"schemeName":"X-Client-ID"},"X-Api-Key":{"type":"apiKey","in":"header","name":"X-Api-Key","scopes":[],"schemeName":"X-Api-Key"}}},"servers":{"0676cd94-979e-48df-aa0c-bd30e3ec97a0":{"url":"https://api.malga.io","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-Client-Id","scopes":[],"schemeName":"X-Client-ID"},"schema":{"title":"X-Client-Id","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"X-Client-ID","name":"X-Client-Id"},{"scheme":{"type":"apiKey","in":"header","name":"X-Api-Key","scopes":[],"schemeName":"X-Api-Key"},"schema":{"title":"X-Api-Key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"X-Api-Key","name":"X-Api-Key"}],"title":"X-Client-ID \u0026 X-Api-Key"}]},"originalFileLocation":"api-reference/api-spec.yaml"},"subdomain":"malga","siteName":"Malga","title":"Capturar uma Venda pré-autorizada - Malga","relatedPagesConfig":{"enabled":true,"limit":4,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-30T16:08:16.832Z","originalFileLocation":"api-reference/purchases/capturar-venda-pre-autorizada.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Captura os cartões pre_authorized de uma Venda criada com capture: false e responde 202 com operation.type: capture. O corpo da requisição é opcional e, quando enviado, deve ser {}: qualquer campo extra devolve 400. Se a Venda estiver em estado misto (cartões authorized e pre_authorized), a captura atua somente nos cartões restantes e responde 202. Envie o header X-Idempotency-Key; sem ele a API devolve 422 com invalid_request. Reenviar a mesma chave com o mesmo corpo devolve 202 com o estado atual da Venda. Casos de 409: - idempotency_key_payload_mismatch: a chave já foi usada com outro corpo ou em outra operação. - purchase_invalid_state: a Venda foi criada com capture: true (a captura é automática), não está pending ou não tem cartões pre_authorized. - purchase_operation_in_progress: já existe uma operação em andamento e você enviou uma chave nova.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Malga\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/malga/FRGYPTtLcTku4cpj/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/malga/FRGYPTtLcTku4cpj/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/malga/FRGYPTtLcTku4cpj/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/malga/FRGYPTtLcTku4cpj/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/malga/FRGYPTtLcTku4cpj/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/malga/FRGYPTtLcTku4cpj/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/malga/FRGYPTtLcTku4cpj/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/malga/FRGYPTtLcTku4cpj/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/malga/FRGYPTtLcTku4cpj/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Capturar uma Venda pré-autorizada - Malga\">\u003cmeta data-mint-head property=\"og:description\" content=\"Captura os cartões pre_authorized de uma Venda criada com capture: false e responde 202 com operation.type: capture. O corpo da requisição é opcional e, quando enviado, deve ser {}: qualquer campo extra devolve 400. Se a Venda estiver em estado misto (cartões authorized e pre_authorized), a captura atua somente nos cartões restantes e responde 202. Envie o header X-Idempotency-Key; sem ele a API devolve 422 com invalid_request. Reenviar a mesma chave com o mesmo corpo devolve 202 com o estado atual da Venda. Casos de 409: - idempotency_key_payload_mismatch: a chave já foi usada com outro corpo ou em outra operação. - purchase_invalid_state: a Venda foi criada com capture: true (a captura é automática), não está pending ou não tem cartões pre_authorized. - purchase_operation_in_progress: já existe uma operação em andamento e você enviou uma chave nova.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Malga Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.malga.io/api-reference/purchases/capturar-venda-pre-autorizada\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://malga.mintlify.site/_mintlify/api/og/v2?division=Purchases\u0026amp;title=Capturar+uma+Venda+pr%C3%A9-autorizada\u0026amp;description=Captura+os+cart%C3%B5es+%60pre_authorized%60+de+uma+Venda+criada+com+%60capture%3A+false%60+e+responde+%60202%60+com+%60operation.type%3A+capture%60.+O+corpo+da+requisi%C3%A7%C3%A3o+%C3%A9+opcional+e%2C\u0026amp;theme=bafc4230bd77064d0121c07f\u0026amp;signature=98a750c96606fb56da007a7fe1c9728fa9072a7c5769bb92b7b8b2ec5760122a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Capturar uma Venda pré-autorizada - Malga\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Captura os cartões pre_authorized de uma Venda criada com capture: false e responde 202 com operation.type: capture. O corpo da requisição é opcional e, quando enviado, deve ser {}: qualquer campo extra devolve 400. Se a Venda estiver em estado misto (cartões authorized e pre_authorized), a captura atua somente nos cartões restantes e responde 202. Envie o header X-Idempotency-Key; sem ele a API devolve 422 com invalid_request. Reenviar a mesma chave com o mesmo corpo devolve 202 com o estado atual da Venda. Casos de 409: - idempotency_key_payload_mismatch: a chave já foi usada com outro corpo ou em outra operação. - purchase_invalid_state: a Venda foi criada com capture: true (a captura é automática), não está pending ou não tem cartões pre_authorized. - purchase_operation_in_progress: já existe uma operação em andamento e você enviou uma chave nova.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://malga.mintlify.site/_mintlify/api/og/v2?division=Purchases\u0026amp;title=Capturar+uma+Venda+pr%C3%A9-autorizada\u0026amp;description=Captura+os+cart%C3%B5es+%60pre_authorized%60+de+uma+Venda+criada+com+%60capture%3A+false%60+e+responde+%60202%60+com+%60operation.type%3A+capture%60.+O+corpo+da+requisi%C3%A7%C3%A3o+%C3%A9+opcional+e%2C\u0026amp;theme=bafc4230bd77064d0121c07f\u0026amp;signature=98a750c96606fb56da007a7fe1c9728fa9072a7c5769bb92b7b8b2ec5760122a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/malga/FRGYPTtLcTku4cpj/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Malga\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2FAC9B\">\u003cmeta data-mint-head name=\"og:locale\" content=\"pt_BR\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.malga.io/api-reference/purchases/capturar-venda-pre-autorizada\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/purchases/capturar-venda-pre-autorizada.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://malga.io/#organization\",\"name\":\"Malga\",\"url\":\"https://malga.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://docs.malga.io/logo/light.svg\"},\"sameAs\":[\"https://www.youtube.com/@gomalga\",\"https://www.linkedin.com/company/gomalga/\",\"https://www.instagram.com/gomalga\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.malga.io#website\",\"name\":\"Malga\",\"url\":\"https://docs.malga.io\",\"publisher\":{\"@id\":\"https://malga.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.malga.io/api-reference/purchases/capturar-venda-pre-autorizada#webpage\",\"url\":\"https://docs.malga.io/api-reference/purchases/capturar-venda-pre-autorizada\",\"name\":\"Capturar uma Venda pré-autorizada\",\"description\":\"Captura os cartões pre_authorized de uma Venda criada com capture: false e responde 202 com operation.type: capture. O corpo da requisição é opcional e, quando enviado, deve ser {}: qualquer campo extra devolve 400. Se a Venda estiver em estado misto (cartões authorized e pre_authorized), a captura atua somente nos cartões restantes e responde 202. Envie o header X-Idempotency-Key; sem ele a API devolve 422 com invalid_request. Reenviar a mesma chave com o mesmo corpo devolve 202 com o estado atual da Venda. Casos de 409: - idempotency_key_payload_mismatch: a chave já foi usada com outro corpo ou em outra operação. - purchase_invalid_state: a Venda foi criada com capture: true (a captura é automática), não está pending ou não tem cartões pre_authorized. - purchase_operation_in_progress: já existe uma operação em andamento e você enviou uma chave nova.\",\"dateModified\":\"2026-09-30T16:08:16.832Z\",\"isPartOf\":{\"@id\":\"https://docs.malga.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.malga.io/api-reference/purchases/capturar-venda-pre-autorizada#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.malga.io/api-reference/purchases/capturar-venda-pre-autorizada#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Purchases\",\"item\":\"https://docs.malga.io/api-reference/purchases/criar-nova-venda\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Capturar uma Venda pré-autorizada\",\"item\":\"https://docs.malga.io/api-reference/purchases/capturar-venda-pre-autorizada\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.malga.io/api-reference/purchases/capturar-venda-pre-autorizada#apireference\",\"headline\":\"Capturar uma Venda pré-autorizada\",\"name\":\"Capturar uma Venda pré-autorizada\",\"description\":\"Captura os cartões pre_authorized de uma Venda criada com capture: false e responde 202 com operation.type: capture. O corpo da requisição é opcional e, quando enviado, deve ser {}: qualquer campo extra devolve 400. Se a Venda estiver em estado misto (cartões authorized e pre_authorized), a captura atua somente nos cartões restantes e responde 202. Envie o header X-Idempotency-Key; sem ele a API devolve 422 com invalid_request. Reenviar a mesma chave com o mesmo corpo devolve 202 com o estado atual da Venda. Casos de 409: - idempotency_key_payload_mismatch: a chave já foi usada com outro corpo ou em outra operação. - purchase_invalid_state: a Venda foi criada com capture: true (a captura é automática), não está pending ou não tem cartões pre_authorized. - purchase_operation_in_progress: já existe uma operação em andamento e você enviou uma chave nova.\",\"url\":\"https://docs.malga.io/api-reference/purchases/capturar-venda-pre-autorizada\",\"mainEntityOfPage\":{\"@id\":\"https://docs.malga.io/api-reference/purchases/capturar-venda-pre-autorizada#webpage\"},\"dateModified\":\"2026-09-30T16:08:16.832Z\",\"publisher\":{\"@id\":\"https://malga.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.malga.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Malga\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Malga","nav":{"global":{"anchors":[{"anchor":"Dashboard","icon":"table-layout","href":"https://dashboard.malga.io/"},{"anchor":"YouTube","icon":"youtube","href":"https://www.youtube.com/@gomalga"},{"anchor":"Status Page","icon":"signal-strong","href":"https://status.malga.io/"}]},"tabs":[{"tab":"Documentação","pages":[{"title":"Documentação","href":"/documentations/welcome/introduction"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/tokenization/v2/intro"}]},{"tab":"Referência da API","groups":[{"group":"Visão Geral","pages":[{"title":"Sobre as APIs da Malga","href":"/api-reference/about-apis"},{"title":"Autenticação","href":"/api-reference/authentication"}]},{"group":"Sub-keys","pages":[{"title":"Criar sub-key","openapi":"post /v1/auth","href":"/api-reference/client-token/criar-nova-chave-publica-para-uso-no-client-side"},{"title":"Remover sub-key","openapi":"delete /v1/auth/{id}","href":"/api-reference/client-token/remover-sub-key"}]},{"group":"Cards","pages":[{"openapi":"get /v1/cards","title":"Listar cartões","href":"/api-reference/cards/listar-cartoes"},{"openapi":"post /v1/cards","title":"Criar novo cartão a partir de token","href":"/api-reference/cards/criar-novo-cartao-a-partir-de-token"},{"openapi":"get /v1/cards/{id}","title":"Recuperar detalhes de cartão","href":"/api-reference/cards/recuperar-detalhes-de-cartao"}]},{"group":"Tokens","pages":[{"openapi":"post /v1/tokens","title":"Criar um novo token","href":"/api-reference/tokens/criar-um-novo-token"}]},{"group":"3DS2 Malga","pages":[{"title":"Criar um novo setup","openapi":"post /v1/charges/3ds/setup","href":"/api-reference/3ds-malga/criar-um-novo-setup"}]},{"group":"Charges","pages":[{"openapi":"get /v1/charges","title":"Listar cobranças","href":"/api-reference/charges/listar-cobrancas"},{"title":"Realizar nova cobrança","openapi":"post /v1/charges","href":"/api-reference/charges/realizar-nova-cobranca"},{"openapi":"get /v1/charges/{id}","title":"Recuperar detalhes de cobrança","href":"/api-reference/charges/recuperar-detalhes-de-cobranca"},{"openapi":"post /v1/charges/{id}","title":"Alterar o status de uma cobrança no ambiente de sandbox","href":"/api-reference/charges/alterar-o-status-de-uma-cobranca-no-ambiente-de-sandbox"},{"openapi":"patch /v1/charges/{id}/antifraud","title":"Alterar o status do antifraude no ambiente de sandbox","href":"/api-reference/charges/alterar-o-status-do-antifraude-no-ambiente-de-sandbox"},{"openapi":"post /v1/charges/{id}/capture","title":"Capturar cobrança pre-autorizada","href":"/api-reference/charges/capturar-cobranca-pre-autorizada"},{"openapi":"post /v1/charges/{id}/void","title":"Estornar cobrança aprovada","href":"/api-reference/charges/estornar-cobranca-aprovada"}]},{"group":"Sessions","pages":[{"openapi":"post /v1/sessions","title":"Criar nova sessão","href":"/api-reference/sessions/criar-nova-sessao"},{"title":"Listar sessões","openapi":"get /v1/sessions","href":"/api-reference/sessions/listar-sessoes"},{"openapi":"get /v1/sessions/{id}","title":"Recuperar detalhes de uma sessão","href":"/api-reference/sessions/recuperar-detalhes-de-uma-sessao"},{"openapi":"patch /v1/sessions/{id}","title":"Atualizar relevância de uma sessão","href":"/api-reference/sessions/atualizar-o-status-de-uma-sessao"},{"openapi":"post /v1/sessions/{id}/charge","title":"Pagar uma sessão","href":"/api-reference/sessions/pagar-uma-sessao"},{"openapi":"post /v1/sessions/{id}/purchase","title":"Pagar uma sessão com múltiplos cartões","href":"/api-reference/sessions/pagar-uma-sessao-com-multiplos-cartoes"},{"openapi":"post /v1/sessions/{id}/cancel","title":"Cancelar uma sessão","href":"/api-reference/sessions/cancelar-uma-sessao"},{"title":"Recuperar o histórico da sessão","openapi":"get /v1/sessions/{id}/history","href":"/api-reference/sessions/recuperar-o-historico-da-sessao"},{"openapi":"get /v1/sessions/{id}/link","title":"Recupera sessão com os dados das configurações da empresa","href":"/api-reference/sessions/recupera-sessao-com-os-dados-das-configuracoes-da-empresa"}]},{"group":"Purchases","pages":[{"openapi":"post /v1/purchases","title":"Criar uma Venda com múltiplos cartões","href":"/api-reference/purchases/criar-nova-venda"},{"openapi":"get /v1/purchases","title":"Listar Vendas","href":"/api-reference/purchases/listar-vendas"},{"openapi":"get /v1/purchases/{id}","title":"Recuperar detalhes de uma Venda","href":"/api-reference/purchases/recuperar-detalhes-de-uma-venda"},{"openapi":"get /v1/purchases/{id}/history","title":"Recuperar o histórico de uma Venda","description":"Retorna a linha do tempo da Venda como um array de marcos, em ordem crescente de `createdAt`. A resposta não é paginada e não usa o formato `{ items, meta }`.\n\nToda Venda existente tem ao menos o marco `created`. O campo `status` de cada item é o nome do marco, não o status da Venda. Os marcos não incluem dados de cartão, `metadata`, `fraudAnalysis` nem IP.\n\nUma Venda inexistente, com `id` malformado ou de outro cliente devolve `404` com `purchase_not_found`.\n","href":"/api-reference/purchases/recuperar-o-historico-da-venda"},{"openapi":"post /v1/purchases/{id}/capture","title":"Capturar uma Venda pré-autorizada","href":"/api-reference/purchases/capturar-venda-pre-autorizada"},{"openapi":"post /v1/purchases/{id}/void","title":"Cancelar ou estornar uma Venda","description":"Rota única para desfazer uma Venda, com o campo opcional `intent`:\n\n- `cancel`: cancela as pré-autorizações de uma Venda `pending` com todos os cartões `pre_authorized`. Responde `202` com `operation.type: void` e a Venda termina `cancelled`.\n- `refund`: estorna o valor integral de uma Venda `paid`. Responde `202` com `operation.type: refund` e a Venda permanece `paid`.\n\nSem `intent` (corpo vazio, `{}` ou `intent: \"\"`), a Malga decide pelo estado da Venda: `paid` estorna e os demais estados cancelam, com as mesmas regras acima. Envie `intent` explicitamente para garantir que um cancelamento nunca vire estorno caso a Venda seja capturada entre a sua leitura e a chamada.\n\nCampos extras no corpo (como `amount`) devolvem `400`. Sem `X-Idempotency-Key`, ou com `intent` fora do enum, a API devolve `422` com `invalid_request`. Reenviar a mesma chave com o mesmo corpo devolve `202` com o estado atual da Venda.\n\nCasos de `409`:\n\n- `idempotency_key_payload_mismatch`: a chave já foi usada com outro corpo ou em outra operação.\n- `purchase_operation_in_progress`: já existe uma operação em andamento e você enviou uma chave nova.\n- `purchase_intent_mismatch`: `cancel` em Venda `paid`, ou `refund` em Venda com cartões apenas pré-autorizados. Nenhum valor é movimentado.\n- `purchase_invalid_state`: estado misto, Venda `failed` ou `cancelled`, ou sem saldo estornável.\n","href":"/api-reference/purchases/cancelar-ou-estornar-venda"}]},{"group":"Subscriptions","pages":[{"openapi":"post /v1/subscriptions","title":"Criação de uma nova assinatura","href":"/api-reference/subscriptions/criacao-de-uma-nova-assinatura"},{"openapi":"get /v1/subscriptions","title":"Listagem de assinaturas","href":"/api-reference/subscriptions/listagem-de-assinaturas"},{"openapi":"get /v1/subscriptions/{id}","title":"Recuperar detalhes de assinatura","href":"/api-reference/subscriptions/recuperar-detalhes-de-assinatura"},{"openapi":"get /v1/subscriptions/{id}/cycles","title":"Listar cycles de uma assinatura","href":"/api-reference/subscriptions/listagem-de-cycles-de-uma-assinatura"},{"openapi":"get /v1/subscriptions/{id}/cycles/{cycleId}","title":"Recuperar detalhes de um cycle específico","href":"/api-reference/subscriptions/recuperar-detalhes-de-cycle"},{"openapi":"put /v1/subscriptions/{id}","title":"Atualizar assinatura","href":"/api-reference/subscriptions/atualizar-assinatura"},{"openapi":"patch /v1/subscriptions/{id}/cancel","title":"Cancelar assinatura","href":"/api-reference/subscriptions/cancelar-assinatura"},{"openapi":"patch /v1/subscriptions/{id}/pause","title":"Pausar assinatura","href":"/api-reference/subscriptions/pausar-assinatura"},{"openapi":"patch /v1/subscriptions/{id}/resume","title":"Reativar assinatura","href":"/api-reference/subscriptions/reativar-assinatura"},{"openapi":"patch /v1/subscriptions/settings","title":"Atualizar configurações do cliente","href":"/api-reference/subscriptions/atualizar-configuracoes-do-cliente"},{"openapi":"get /v1/subscriptions/settings","title":"Obter configurações do cliente","href":"/api-reference/subscriptions/obter-configuracoes-do-cliente"}]},{"group":"Customers","pages":[{"openapi":"get /v1/customers","title":"Listagem de customers cadastrados","href":"/api-reference/customers/listagem-de-customers-cadastrados"},{"openapi":"post /v1/customers","title":"Criação de novo customer para cobrança","href":"/api-reference/customers/criacao-de-novo-customer-para-cobranca"},{"openapi":"get /v1/customers/{id}","title":"Recuperar detalhes de customer","href":"/api-reference/customers/recuperar-detalhes-de-customer"},{"openapi":"delete /v1/customers/{id}","title":"Deletar customer pelo id","href":"/api-reference/customers/deletar-customer-pelo-id"},{"openapi":"patch /v1/customers/{id}","title":"Atualizar customer pelo id","href":"/api-reference/customers/atualizar-customer-pelo-id"},{"openapi":"get /v1/customers/{customer_id}/cards","title":"Listagem dos cartões do customer","href":"/api-reference/customers/listagem-dos-cartoes-do-customer"},{"openapi":"post /v1/customers/{customer_id}/cards","title":"Adicionar cartão de crédito ao customer","href":"/api-reference/customers/adicionar-cartao-de-credito-ao-customer"}]},{"group":"Merchants","pages":[{"openapi":"get /v1/merchants","title":"Listagem de merchants cadastrados","href":"/api-reference/merchants/listagem-de-merchants-cadastrados"},{"openapi":"post /v1/merchants","title":"Criação de novo merchant para cobrança","href":"/api-reference/merchants/criacao-de-novo-merchant-para-cobranca"},{"openapi":"get /v1/merchants/{id}","title":"Recuperar detalhes de merchant pelo id","href":"/api-reference/merchants/recuperar-detalhes-de-merchant-pelo-id"},{"openapi":"delete /v1/merchants/{id}","title":"Deletar merchant pelo id","href":"/api-reference/merchants/deletar-merchant-pelo-id"},{"openapi":"patch /v1/merchants/{id}","title":"Atualizar configurações de merchant","href":"/api-reference/merchants/atualizar-configuracoes-de-merchant"},{"group":"Platform Fee","pages":[{"openapi":"patch /v1/merchants/{merchantId}/platform-fee/enabled","title":"Ativar ou desativar platform fee do merchant","href":"/api-reference/merchants/ativar-desativar-platform-fee"},{"openapi":"post /v1/merchants/{merchantId}/platform-fee","title":"Criar regras de platform fee","href":"/api-reference/merchants/criar-regras-de-platform-fee"},{"openapi":"get /v1/merchants/{merchantId}/platform-fee","title":"Listar regras de platform fee","href":"/api-reference/merchants/listar-regras-de-platform-fee"},{"openapi":"put /v1/merchants/{merchantId}/platform-fee","title":"Atualizar regras de platform fee","href":"/api-reference/merchants/atualizar-regras-de-platform-fee"},{"openapi":"delete /v1/merchants/{merchantId}/platform-fee/{platformFeeId}","title":"Deletar uma regra de platform fee pelo ID","href":"/api-reference/merchants/deletar-regras-de-platform-fee"},{"openapi":"post /v1/merchants/{merchantId}/sellers/{sellerId}/platform-fee","title":"Criar regras de platform fee de um seller","href":"/api-reference/merchants/criar-regras-de-platform-fee-do-seller"},{"openapi":"get /v1/merchants/{merchantId}/sellers/{sellerId}/platform-fee","title":"Listar regras de platform fee de um seller","href":"/api-reference/merchants/listar-regras-de-platform-fee-do-seller"},{"openapi":"put /v1/merchants/{merchantId}/sellers/{sellerId}/platform-fee","title":"Atualizar regras de platform fee de um seller","href":"/api-reference/merchants/atualizar-regras-de-platform-fee-do-seller"}]}]},{"group":"Providers","pages":[{"openapi":"patch /v1/providers/{id}","title":"Atualizar configurações de provedores do merchant","href":"/api-reference/providers/atualizar-configuracoes-de-provider-de-merchant"}]},{"group":"Vendors","pages":[{"openapi":"get /v1/vendors","title":"Listagem de vendedores paginada","href":"/api-reference/vendors/listagem-paginada-de-vendedores"},{"openapi":"post /v1/vendors","title":"Criação de um novo vendedor","href":"/api-reference/vendors/criacao-de-um-novo-vendedor"},{"openapi":"patch /v1/vendors/{id}","title":"Atualizar um vendedor","href":"/api-reference/vendors/atualizacao-de-vendedor-pelo-id"},{"openapi":"get /v1/vendors/{id}","title":"Recuperar detalhes de um vendedor","href":"/api-reference/vendors/consultar-um-vendedor-pelo-id"},{"openapi":"delete /v1/vendors/{id}","title":"Deletar vededor pelo id","href":"/api-reference/vendors/deletar-vendedor-por-id"}]},{"group":"Sellers","pages":[{"openapi":"post /v1/sellers","title":"Criação de um novo recebedor","href":"/api-reference/sellers/criacao-de-um-novo-recebedor"},{"openapi":"get /v1/sellers/{id}","title":"Consultar um recebedor pelo ID","href":"/api-reference/sellers/consultar-um-recebedor-pelo-id"},{"openapi":"get /v1/sellers","title":"Consultar recebedores por listagem paginada","href":"/api-reference/sellers/consultar-um-recebedor-por-listagem-paginada"},{"openapi":"delete /v1/sellers/{id}","title":"Deletar recebedor por ID","href":"/api-reference/sellers/deletar-recebedor-por-id"},{"openapi":"patch /v1/sellers/{id}","title":"Atualização de recebedor pelo ID","href":"/api-reference/sellers/atualizacao-de-recebedor-pelo-id"},{"openapi":"delete /v1/sellers/{id}/plan","title":"Desvincular plano de venda de um recebedor","href":"/api-reference/sellers/desvincular-plano-de-venda-de-um-recebedor"},{"title":"Alterar status de recebedor no Sandbox","openapi":"post /v1/sellers/{id}/status","href":"/api-reference/sellers/alterar-o-status-de-um-recebedor-no-ambiente-de-sandbox"},{"openapi":"post /v1/sellers/documents","title":"Upload de documento","href":"/api-reference/sellers/upload-de-documento"},{"openapi":"get /v1/sellers/documents","title":"Listar documentos","href":"/api-reference/sellers/listar-documentos"},{"openapi":"get /v1/sellers/documents/{documentId}","title":"Consultar documento","href":"/api-reference/sellers/consultar-documento"},{"openapi":"delete /v1/sellers/documents/{documentId}","title":"Deletar documento","href":"/api-reference/sellers/deletar-documento"},{"openapi":"get /v1/sellers/registration-reviews","title":"Listar processos de revisão cadastral","href":"/api-reference/sellers/listar-processos-de-revisao-cadastral"},{"openapi":"get /v1/sellers/{sellerId}/registration-reviews","title":"Listar processos de revisão cadastral de um recebedor","href":"/api-reference/sellers/listar-processos-de-revisao-cadastral-de-um-recebedor"},{"openapi":"post /v1/sellers/{sellerId}/registration-reviews/{processId}/submit","title":"Enviar os dados coletados de uma revisão cadastral","href":"/api-reference/sellers/enviar-dados-de-revisao-cadastral"}]},{"group":"Payouts","pages":[{"openapi":"get /v1/payouts/balance","title":"Consultar saldo","href":"/api-reference/payouts/consultar-saldo-de-payouts"},{"openapi":"get /v1/payouts/payment-batches","title":"Listar repasses","href":"/api-reference/payouts/listar-payment-batches"},{"openapi":"get /v1/payouts/payment-batches/{id}","title":"Consultar repasse pelo ID","href":"/api-reference/payouts/consultar-payment-batch-pelo-id"},{"openapi":"get /v1/payouts/payment-batches/{id}/orders","title":"Listar ordens de pagamento de um repasse","href":"/api-reference/payouts/listar-ordens-de-um-payment-batch"},{"openapi":"get /v1/payouts/orders","title":"Listar ordens de pagamento","href":"/api-reference/payouts/listar-ordens"},{"openapi":"get /v1/payouts/orders/{id}","title":"Consultar ordem de pagamento pelo ID","href":"/api-reference/payouts/consultar-ordem-pelo-id"}]},{"group":"Plans","pages":[{"openapi":"get /v1/subacquirer/plans","title":"Listar planos de venda","href":"/api-reference/subacquirer/listar-planos-de-venda"}]},{"group":"Prepayment","tag":"BETA","pages":[{"openapi":"get /v1/subacquirer/prepayment/receivables","title":"Consultar recebíveis disponíveis para antecipação","href":"/api-reference/prepayment/consultar-recebiveis-disponiveis-para-antecipacao"},{"openapi":"post /v1/subacquirer/prepayment","title":"Simular antecipação","href":"/api-reference/prepayment/simular-antecipacao"},{"openapi":"get /v1/subacquirer/prepayment","title":"Listar antecipações","href":"/api-reference/prepayment/listar-antecipacoes"},{"openapi":"get /v1/subacquirer/prepayment/{id}","title":"Recuperar detalhes de uma antecipação","href":"/api-reference/prepayment/consultar-antecipacao"},{"openapi":"post /v1/subacquirer/prepayment/{id}/commit","title":"Confirmar antecipação (aceite)","href":"/api-reference/prepayment/confirmar-antecipacao"}]},{"group":"Receipts","pages":[{"openapi":"post /v1/subacquirer/{transactionId}/receipts","title":"Gerar documento comprobatório de estorno","href":"/api-reference/receipts/gerar-documento-comprobatorio"}]},{"group":"Flows","pages":[{"openapi":"get /v1/flows","title":"Recuperar todos os fluxos paginado","href":"/api-reference/flows/recuperar-todos-os-fluxos-paginado"},{"openapi":"get /v1/flows/{id}","title":"Consultar um fluxo pelo id","href":"/api-reference/flows/consultar-um-fluxo-pelo-id"}]},{"group":"Webhooks","pages":[{"openapi":"get /v1/webhooks","title":"Listagem de webhooks cadastrados","href":"/api-reference/webhooks/listagem-de-webhooks-cadastrados"},{"openapi":"post /v1/webhooks","title":"Criação de novo webhook para notificação","href":"/api-reference/webhooks/criacao-de-novo-webhook-para-notificacao"},{"openapi":"get /v1/webhooks/{id}","title":"Recuperar detalhes de webhook","href":"/api-reference/webhooks/recuperar-detalhes-de-webhook"},{"openapi":"delete /v1/webhooks/{id}","title":"Deletar webhook pelo id","href":"/api-reference/webhooks/deletar-webhook-pelo-id"},{"openapi":"patch /v1/webhooks/{id}","title":"Atualizar webhook pelo id","href":"/api-reference/webhooks/atualizar-webhook-pelo-id"}]},{"group":"Settings","pages":[{"title":"Configurar link de pagamento personalizado","openapi":"post /v1/settings","href":"/api-reference/settings/criar-configuracao-de-link-de-pagamento"},{"title":"Recuperar configuração de link de pagamento personalizado","openapi":"get /v1/settings","href":"/api-reference/settings/recuperar-configuracao-de-link-de-pagamento"},{"title":"Editar configuração de link de pagamento","openapi":"patch /v1/settings","href":"/api-reference/settings/editar-configuracao-de-link-de-pagamento"},{"title":"Cadastrar códigos de facilitador por bandeira","openapi":"put /v1/settings/payment-facilitators","href":"/api-reference/settings/cadastrar-codigos-de-facilitador-por-bandeira"},{"title":"Listar códigos de facilitador por bandeira","openapi":"get /v1/settings/payment-facilitators","href":"/api-reference/settings/listar-codigos-de-facilitador-por-bandeira"}]}]},{"tab":"Analytics","pages":[{"title":"Analytics","href":"/analytics/intro"}]},{"tab":"Release Notes","pages":[{"title":"Release Notes","href":"/release-notes/2026-10-29-Release-Notes"}]}]},"basePath":"","title":"Capturar uma Venda pré-autorizada - Malga","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["BannerMarkdown-DV-WToSZ.js","dist-CBUH0-zX.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-CR-RHrVC.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-C-hEh3I2.js","utils-CnF4QiUD.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C7PVNbel.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-8ytevL2A.js","snippetPresets-BT1alx3v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BLXC0i_W.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CyLIGI9_.js","shallow-DC0lGVIW.js","getApiPlaygroundDisplay-CgDQ85tN.js","CodeSnippet-6-I-Gpv9.js","CodeSnippets-BAk1kDdu.js","Page-C945cI-W.js","getPastedJson-B276RuWN.js","icon-BqP8etTm.js","MethodPill-DM6sbxG1.js","DuplicateIcon-PyJglOaE.js","createIcon-CMeOMAc_.js","DynamicMarkdown-BoyYAA8K.js","SectionHeading-DAYv3gvZ.js","axios-vUo_bRtp.js","Markdown-BhTTmazV.js","AssistantPageLink-BmARFYNC.js"]}