O campo deliveryId (e o header X-Astronpay-Delivery) identifica unicamente cada tentativa de entrega. O mesmo evento pode ser entregue mais de uma vez em caso de falha de rede — armazene o deliveryId e ignore duplicatas.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Astron Pay","colors":{"primary":"#AE0900","light":"#D1251C","dark":"#7A0600"},"favicon":"https://mintcdn.com/astronpay/UUbKvlzDU35kAyYt/logo/astronpay.png?fit=max\u0026auto=format\u0026n=UUbKvlzDU35kAyYt\u0026q=85\u0026s=0a6bc0ae72b019a54fae289e6122df26","logo":{"light":"https://mintcdn.com/astronpay/UUbKvlzDU35kAyYt/logo/astronpay.png?fit=max\u0026auto=format\u0026n=UUbKvlzDU35kAyYt\u0026q=85\u0026s=0a6bc0ae72b019a54fae289e6122df26","dark":"https://mintcdn.com/astronpay/UUbKvlzDU35kAyYt/logo/astronpay.png?fit=max\u0026auto=format\u0026n=UUbKvlzDU35kAyYt\u0026q=85\u0026s=0a6bc0ae72b019a54fae289e6122df26"},"api":{"openapi":["cripto/openapi.json","gateway/openapi.json"]},"navbar":{"primary":{"type":"button","label":"Dashboard","href":"https://web.astronpay.co"}},"footer":{"socials":{"linkedin":"https://linkedin.com/company/astronpay"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Status","href":"https://status.astronpay.co","icon":"signal-bars"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"astronpay","hasAudioNarration":false,"actualSubdomain":"astronpay","customDomains":["docs.astronpay.co"],"gitSource":{"type":"github","owner":"beginssoftwares","repo":"3xchange2.0","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad7e2bbaf742268de255a78","collectionId":"0d8815c6-4420-4487-ae7c-ede39576e4fb","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad7e2bbaf742268de255a78"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ad7e2bbaf742268de255a78","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"PIX ↔ Cripto","count":46},{"language":"default","tag":"Gateway PIX","count":33},{"language":"default","tag":"Receivers","count":8},{"language":"default","tag":"Transações","count":8},{"language":"default","tag":"Introdução","count":7},{"language":"default","tag":"Banking as a Service (BaaS)","count":7},{"language":"default","tag":"Guias","count":6},{"language":"default","tag":"Conceitos","count":5},{"language":"default","tag":"Sub-accounts API","count":5},{"language":"default","tag":"Webhooks","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"editor-v7-file-tree","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":"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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"cripto/webhooks/overview","slug":"/cripto/webhooks/overview","pageMetadata":{"title":"Webhooks — visão geral","description":"Eventos enviados pela Astron Pay ao seu backend.","href":"/cripto/webhooks/overview"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Eventos enviados pela Astron Pay ao seu backend.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Webhooks são o canal assíncrono pelo qual a Astron Pay notifica seu backend sobre mudanças de estado (ordens, KYC, liquidações, etc.).`}),`\n`,_jsx(Heading,{level:`2`,id:`visão-geral`,children:`Visão geral`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Configure URL + secret via `,_jsx(_components.code,{children:`PATCH /api/v1/webhook/config`}),` (ver `,_jsx(_components.a,{href:`/cripto/guides/webhook-setup`,children:`Guia de configuração`}),`).`]}),`\n`,_jsxs(_components.li,{children:[`Os eventos chegam como `,_jsx(_components.code,{children:`POST`}),` com JSON no body.`]}),`\n`,_jsxs(_components.li,{children:[`Headers incluem `,_jsx(_components.code,{children:`X-Astronpay-Signature`}),` (HMAC SHA-256 do body bruto) e `,_jsx(_components.code,{children:`X-Astronpay-Delivery`}),` (ID único da entrega).`]}),`\n`,_jsxs(_components.li,{children:[`Responda `,_jsx(_components.code,{children:`200`}),` dentro de `,_jsx(_components.strong,{children:`10 s`}),`. Qualquer outro status ou timeout dispara retry.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`configuração`,children:`Configuração`}),`\n`,_jsx(_components.p,{children:`Configure URL e secret via API:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PATCH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.astronpay.co/api/v1/webhook/config`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-secret: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$API_SECRET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"webhookUrl\": \"https://meusite.com/webhooks/astronpay\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"webhookSecret\": \"minha-chave-secreta-minimo-8-chars\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Consultar configuração atual:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.astronpay.co/api/v1/webhook/config`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-secret: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$API_SECRET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Os campos aceitos pelo `,_jsx(_components.code,{children:`PATCH`}),` são `,_jsx(_components.code,{children:`webhookUrl`}),` e `,_jsx(_components.code,{children:`webhookSecret`}),`. Passe `,_jsx(_components.code,{children:`null`}),` para remover um valor.`]}),`\n`,_jsx(Heading,{level:`2`,id:`headers-enviados`,children:`Headers enviados`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Descrição`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`X-Astronpay-Signature`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`sha256=\u003chmac-hex>`}),` — assinatura HMAC-SHA256 do body bruto`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`X-Astronpay-Delivery`})}),_jsx(_components.td,{children:`ID único desta entrega (UUID) — use para idempotência`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`X-Astronpay-Event`})}),_jsxs(_components.td,{children:[`Nome do evento (ex.: `,_jsx(_components.code,{children:`order.completed`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Content-Type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`application/json`})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`payload`,children:`Payload`}),`\n`,_jsx(_components.p,{children:`Todo evento segue este formato:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"order.completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"orderId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ord_uuid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"externalId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"meu-pedido-123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PAYIN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"COMPLETED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-04-16T18:31:12.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"deliveryId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"uuid-da-entrega\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Os campos de nível raiz variam por evento. Schemas por tipo: `,_jsx(_components.a,{href:`/cripto/webhooks/events`,children:`Eventos`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`retentativas`,children:`Retentativas`}),`\n`,_jsx(_components.p,{children:`A Astron Pay retenta com backoff exponencial por até 24 h. Após isso, o evento é descartado.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Tentativa`}),_jsx(_components.th,{children:`Delay aproximado`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`1`}),_jsx(_components.td,{children:`Imediato`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`2`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`30 s`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`3`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2 min`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`4`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`10 min`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`5`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1 h`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`6`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`4 h`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`7`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`12 h`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`8`}),_jsx(_components.td,{children:`24 h (última)`})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Seu endpoint deve responder com `,_jsx(_components.code,{children:`2xx`}),` em até `,_jsx(_components.strong,{children:`10 segundos`}),`. Processe eventos de forma assíncrona se necessário.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`idempotência`,children:`Idempotência`}),`\n`,_jsxs(_components.p,{children:[`O campo `,_jsx(_components.code,{children:`deliveryId`}),` (e o header `,_jsx(_components.code,{children:`X-Astronpay-Delivery`}),`) identifica unicamente cada tentativa de entrega. O mesmo evento pode ser entregue mais de uma vez em caso de falha de rede — armazene o `,_jsx(_components.code,{children:`deliveryId`}),` e ignore duplicatas.`]}),`\n`,_jsx(Heading,{level:`2`,id:`segurança`,children:`Segurança`}),`\n`,_jsxs(_components.p,{children:[`Verifique a assinatura antes de processar qualquer payload. Ver `,_jsx(_components.a,{href:`/cripto/webhooks/validation`,children:`Validação de assinatura`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Webhooks — visão geral","description":"Eventos enviados pela Astron Pay ao seu backend.","href":"/cripto/webhooks/overview"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Visão geral","slug":"visão-geral","depth":2,"children":[]},{"title":"Configuração","slug":"configuração","depth":2,"children":[]},{"title":"Headers enviados","slug":"headers-enviados","depth":2,"children":[]},{"title":"Payload","slug":"payload","depth":2,"children":[]},{"title":"Retentativas","slug":"retentativas","depth":2,"children":[]},{"title":"Idempotência","slug":"idempotência","depth":2,"children":[]},{"title":"Segurança","slug":"segurança","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"astronpay","siteName":"Astron Pay","title":"Webhooks — visão geral - Astron Pay","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-30T17:43:04.894Z","originalFileLocation":"cripto/webhooks/overview.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=\"Eventos enviados pela Astron Pay ao seu backend.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Astron Pay\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/astronpay/jn7N72HOsC2MZGCC/_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/astronpay/jn7N72HOsC2MZGCC/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/astronpay/jn7N72HOsC2MZGCC/_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/astronpay/jn7N72HOsC2MZGCC/_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/astronpay/jn7N72HOsC2MZGCC/_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/astronpay/jn7N72HOsC2MZGCC/_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/astronpay/jn7N72HOsC2MZGCC/_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/astronpay/jn7N72HOsC2MZGCC/_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/astronpay/jn7N72HOsC2MZGCC/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Webhooks — visão geral - Astron Pay\">\u003cmeta data-mint-head property=\"og:description\" content=\"Eventos enviados pela Astron Pay ao seu backend.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Astron Pay\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.astronpay.co/cripto/webhooks/overview\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://astronpay.mintlify.app/_mintlify/api/og/v2?division=Webhooks+recebidos\u0026amp;title=Webhooks+%E2%80%94+vis%C3%A3o+geral\u0026amp;description=Eventos+enviados+pela+Astron+Pay+ao+seu+backend.\u0026amp;theme=56405a1875fffb17dea0e909\u0026amp;signature=412ddd40f7dbb2719dedf4ace5067d4b3bcc517fc2a797fc8f75947783fe4b2f\">\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=\"Webhooks — visão geral - Astron Pay\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Eventos enviados pela Astron Pay ao seu backend.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://astronpay.mintlify.app/_mintlify/api/og/v2?division=Webhooks+recebidos\u0026amp;title=Webhooks+%E2%80%94+vis%C3%A3o+geral\u0026amp;description=Eventos+enviados+pela+Astron+Pay+ao+seu+backend.\u0026amp;theme=56405a1875fffb17dea0e909\u0026amp;signature=412ddd40f7dbb2719dedf4ace5067d4b3bcc517fc2a797fc8f75947783fe4b2f\">\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/astronpay/jn7N72HOsC2MZGCC/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Astron Pay\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#AE0900\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.astronpay.co/cripto/webhooks/overview\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/cripto/webhooks/overview.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.astronpay.co/#organization\",\"name\":\"Astron Pay\",\"url\":\"https://docs.astronpay.co\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/astronpay/UUbKvlzDU35kAyYt/logo/astronpay.png?fit=max\u0026auto=format\u0026n=UUbKvlzDU35kAyYt\u0026q=85\u0026s=0a6bc0ae72b019a54fae289e6122df26\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.astronpay.co#website\",\"name\":\"Astron Pay\",\"url\":\"https://docs.astronpay.co\",\"publisher\":{\"@id\":\"https://docs.astronpay.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.astronpay.co/cripto/webhooks/overview#webpage\",\"url\":\"https://docs.astronpay.co/cripto/webhooks/overview\",\"name\":\"Webhooks — visão geral\",\"description\":\"Eventos enviados pela Astron Pay ao seu backend.\",\"dateModified\":\"2026-07-30T17:43:04.894Z\",\"isPartOf\":{\"@id\":\"https://docs.astronpay.co#website\"},\"breadcrumb\":{\"@id\":\"https://docs.astronpay.co/cripto/webhooks/overview#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.astronpay.co/cripto/webhooks/overview#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Astron Pay\",\"item\":\"https://docs.astronpay.co\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Webhooks — visão geral\",\"item\":\"https://docs.astronpay.co/cripto/webhooks/overview\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.astronpay.co/cripto/webhooks/overview#article\",\"headline\":\"Webhooks — visão geral\",\"name\":\"Webhooks — visão geral\",\"description\":\"Eventos enviados pela Astron Pay ao seu backend.\",\"url\":\"https://docs.astronpay.co/cripto/webhooks/overview\",\"mainEntityOfPage\":{\"@id\":\"https://docs.astronpay.co/cripto/webhooks/overview#webpage\"},\"dateModified\":\"2026-07-30T17:43:04.894Z\",\"publisher\":{\"@id\":\"https://docs.astronpay.co/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.astronpay.co#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Astron Pay\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Astron Pay","nav":{"global":{"anchors":[{"anchor":"Status","href":"https://status.astronpay.co","icon":"signal-bars"}]},"tabs":[{"tab":"Gateway PIX","pages":[{"title":"Gateway PIX","href":"/gateway/introduction"}]},{"tab":"PIX ↔ Cripto","groups":[{"group":"Introdução","pages":[{"title":"Introdução","href":"/cripto/introduction"},{"title":"Autenticação","href":"/cripto/authentication"},{"title":"Quickstart","href":"/cripto/quickstart"},{"title":"Erros","href":"/cripto/errors"}]},{"group":"Conceitos","pages":[{"title":"Merchants e Receivers","href":"/cripto/concepts/merchants-receivers"},{"title":"Ciclo de vida das ordens","href":"/cripto/concepts/orders-lifecycle"},{"title":"Taxas","href":"/cripto/concepts/fees"},{"title":"Ledger e liquidações","href":"/cripto/concepts/ledger-settlements"},{"title":"Assinatura de transações","href":"/cripto/concepts/wallet-signing"}]},{"group":"Guias","pages":[{"title":"Onboarding de receiver","href":"/cripto/guides/receiver-onboarding"},{"title":"Fluxo Payin (BRL → Crypto)","href":"/cripto/guides/payin-flow"},{"title":"Fluxo Payout (Crypto → BRL)","href":"/cripto/guides/payout-flow"},{"title":"Depósito de payout assinado pela Astron Pay","href":"/cripto/guides/payout-deposit-tx"},{"title":"Configurando webhooks","href":"/cripto/guides/webhook-setup"},{"title":"Consultando saldos","description":"Como consultar saldos, entries, taxas e liquidações.","href":"/cripto/guides/ledger-queries"}]},{"group":"Webhooks recebidos","pages":[{"title":"Webhooks — visão geral","href":"/cripto/webhooks/overview"},{"title":"Eventos","description":"Catálogo de eventos de webhook e seus payloads.","href":"/cripto/webhooks/events"},{"title":"Validação de assinatura","href":"/cripto/webhooks/validation"}]},{"group":"Fee Tiers","pages":[{"title":"Lista fee tiers","openapi":"cripto/openapi.json GET /fee-tiers","href":"/cripto/api-reference/fee-tiers/get-fee-tiers"},{"title":"Atualiza fee tiers","openapi":"cripto/openapi.json PUT /fee-tiers/{orderType}","href":"/cripto/api-reference/fee-tiers/put-fee-tiers"}]},{"group":"Receivers","pages":[{"title":"Cria receiver","openapi":"cripto/openapi.json POST /receivers","href":"/cripto/api-reference/receivers/create"},{"title":"Lista receivers","openapi":"cripto/openapi.json GET /receivers","href":"/cripto/api-reference/receivers/list"},{"title":"Busca receiver","openapi":"cripto/openapi.json GET /receivers/{id}","href":"/cripto/api-reference/receivers/get"},{"title":"Atualiza receiver","openapi":"cripto/openapi.json PATCH /receivers/{id}","href":"/cripto/api-reference/receivers/update"},{"title":"Limites do receiver","openapi":"cripto/openapi.json GET /receivers/{id}/limits","href":"/cripto/api-reference/receivers/limits"},{"title":"Submete KYC","openapi":"cripto/openapi.json POST /receivers/{id}/kyc/submit","href":"/cripto/api-reference/receivers/kyc-submit"},{"title":"Assina transação","openapi":"cripto/openapi.json POST /receivers/{receiverId}/wallet/sign-transaction","href":"/cripto/api-reference/receivers/wallet-sign"},{"title":"Assina e transmite","openapi":"cripto/openapi.json POST /receivers/{receiverId}/wallet/sign-and-send-transaction","href":"/cripto/api-reference/receivers/wallet-sign-and-send"}]},{"group":"Quote","pages":[{"title":"Cotação payin","openapi":"cripto/openapi.json POST /quote/payin","href":"/cripto/api-reference/quote/payin"},{"title":"Cotação payout","openapi":"cripto/openapi.json POST /quote/payout","href":"/cripto/api-reference/quote/payout"}]},{"group":"Payin","pages":[{"title":"Cria ordem de payin","openapi":"cripto/openapi.json POST /payin","href":"/cripto/api-reference/payin/create"},{"title":"Busca ordem de payin","openapi":"cripto/openapi.json GET /payin/{id}","href":"/cripto/api-reference/payin/get"}]},{"group":"Payout","pages":[{"title":"Cria ordem de payout","openapi":"cripto/openapi.json POST /payout","href":"/cripto/api-reference/payout/create"},{"title":"Busca ordem de payout","openapi":"cripto/openapi.json GET /payout/{id}","href":"/cripto/api-reference/payout/get"}]},{"group":"Orders","pages":[{"title":"Lista ordens","openapi":"cripto/openapi.json GET /orders","href":"/cripto/api-reference/orders/list"},{"title":"Cotação rápida","openapi":"cripto/openapi.json GET /orders/quote","href":"/cripto/api-reference/orders/quote"},{"title":"Busca ordem","openapi":"cripto/openapi.json GET /orders/{id}","href":"/cripto/api-reference/orders/get"}]},{"group":"Merchant Wallet","pages":[{"title":"Assina transação (merchant)","openapi":"cripto/openapi.json POST /merchant/wallet/sign-transaction","href":"/cripto/api-reference/merchant-wallet/sign"},{"title":"Assina e transmite (merchant)","openapi":"cripto/openapi.json POST /merchant/wallet/sign-and-send-transaction","href":"/cripto/api-reference/merchant-wallet/sign-and-send"}]},{"group":"Ledger","pages":[{"title":"Saldo do receiver","openapi":"cripto/openapi.json GET /ledger/receivers/{id}/balance","href":"/cripto/api-reference/ledger/receiver-balance"},{"title":"Entries do receiver","openapi":"cripto/openapi.json GET /ledger/receivers/{id}/entries","href":"/cripto/api-reference/ledger/receiver-entries"},{"title":"Saldo de taxas","openapi":"cripto/openapi.json GET /ledger/fees/balance","href":"/cripto/api-reference/ledger/fees-balance"},{"title":"Liquidações","openapi":"cripto/openapi.json GET /ledger/settlements","href":"/cripto/api-reference/ledger/settlements"}]},{"group":"Webhook Config","pages":[{"title":"Config de webhook","openapi":"cripto/openapi.json GET /webhook/config","href":"/cripto/api-reference/webhook-config/get"},{"title":"Atualiza config","openapi":"cripto/openapi.json PATCH /webhook/config","href":"/cripto/api-reference/webhook-config/update"},{"title":"Eventos disponíveis","openapi":"cripto/openapi.json GET /webhook/events","href":"/cripto/api-reference/webhook-config/events"}]}]}]},"title":"Webhooks — visão geral - Astron Pay","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":[],"chunks":[]}