Alana Shopping envia eventos de webhook para mudanças de cobrança e assinatura via Stripe. Sua aplicação pode escutar esses eventos para automatizar fluxos de trabalho.
Stripe tenta novamente entregas de webhook falhadas com backoff exponencial por até 3 dias. Garanta que seu endpoint retorne um código de status 200 prontamente para evitar retentativas.
Última modificação em 16 de fevereiro de 2026
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Alana Shopping B2B","description":"Help center and developer hub for Alana Shopping B2B — AI-powered product content platform for brands and retailers.","colors":{"primary":"#ff8086","light":"#ff8086","dark":"#ff8086"},"logo":{"light":"https://mintcdn.com/alana/Dr3xX14a3TaLPBgT/images/logo.svg?fit=max\u0026auto=format\u0026n=Dr3xX14a3TaLPBgT\u0026q=85\u0026s=f8ceb81884ba65a782265580405c98e3","dark":"https://mintcdn.com/alana/Dr3xX14a3TaLPBgT/images/logo-white.svg?fit=max\u0026auto=format\u0026n=Dr3xX14a3TaLPBgT\u0026q=85\u0026s=fa8d949b437d9de87f067f42621442c2","href":"https://alana.ai"},"favicon":"https://mintcdn.com/alana/Dr3xX14a3TaLPBgT/images/favicon.svg?fit=max\u0026auto=format\u0026n=Dr3xX14a3TaLPBgT\u0026q=85\u0026s=67a22eba367230becfd8a462a816847d","api":{"openapi":"openapi.json","playground":{"display":"interactive"}},"appearance":{"default":"system"},"background":{"decoration":"gradient"},"navbar":{"links":[{"href":"https://app.alana.shopping","label":"Dashboard"}],"primary":{"type":"button","label":"Começar","href":"https://app.alana.shopping/auth/signup"}},"footer":{"socials":{"linkedin":"https://linkedin.com/company/alana-ai","github":"https://github.com/alana-ai"},"links":[{"header":"Produto","items":[{"label":"Dashboard","href":"https://app.alana.shopping"},{"label":"Motor de Conteúdo IA","href":"/pt/help/ai/how-ai-works"},{"label":"Integrações","href":"/pt/help/integrations/connecting-platforms"},{"label":"Planos e Preços","href":"/pt/help/account/plans-and-pricing"}]},{"header":"Desenvolvedores","items":[{"label":"Quickstart","href":"/pt/quickstart"},{"label":"Referência da API","href":"/pt/api-reference/overview"},{"label":"Guia de Webhooks","href":"/pt/guides/webhooks"},{"label":"Changelog","href":"/pt/changelog/overview"}]},{"header":"Empresa","items":[{"label":"Sobre a Alana","href":"https://alana.ai"},{"label":"Status do Sistema","href":"https://status.alana.shopping"},{"label":"Comunidade","href":"https://community.alana.ai"},{"label":"Fale com o Suporte","href":"mailto:support@alana.shopping"}]}]},"search":{"prompt":"Buscar na ajuda e docs..."},"seo":{"metatags":{"robots":"noindex, nofollow"}},"fonts":{"heading":{"family":"MuseoModerno","weight":600},"body":{"family":"Inter","weight":400}},"styling":{"eyebrows":"breadcrumbs","latex":true},"integrations":{"intercom":{"appId":"veyiki4k"}},"banner":{"content":"Bem-vindo ao nosso novo hub de docs! Central de Ajuda + Docs para Desenvolvedores em um só lugar.","dismissible":true},"errors":{"404":{"redirect":false,"title":"página não encontrada","description":"Esta página não existe ou pode ter sido movida. Tente buscar ou volte para a [Central de Ajuda](/pt/help/welcome)."}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"thumbnails":{"appearance":"light","fonts":{"family":"Inter"}},"metadata":{"timestamp":true},"navigation":{"languages":[{"language":"pt-BR","default":true,"href":"pt/help/welcome"},{"language":"en","href":"en/help/welcome"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"alana","hasAudioNarration":false,"actualSubdomain":"alana","customDomains":["docs.alana.shopping"],"gitSource":{"type":"github","owner":"a-alanaai","repo":"shopping-b2b-v1","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ab8cd53d3623a442e30ada6","collectionId":"ec538318-9dd1-4797-adf3-58756a6a8a4a","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ab8cd53d3623a442e30ada6"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6abbe86b11ea8cb4851ab88b","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"en","tag":"API Reference","count":90},{"language":"pt-BR","tag":"Referência da API","count":90},{"language":"en","tag":"Help Center","count":35},{"language":"pt-BR","tag":"Central de Ajuda","count":35},{"language":"en","tag":"Documentation","count":27},{"language":"pt-BR","tag":"Documentação","count":27},{"language":"default","tag":"API Reference","count":20},{"language":"en","tag":"Guides","count":14},{"language":"pt-BR","tag":"Guias","count":14},{"language":"en","tag":"Brands","count":11},{"language":"pt-BR","tag":"Marcas","count":11},{"language":"en","tag":"Core Concepts","count":10},{"language":"pt-BR","tag":"Conceitos Fundamentais","count":10},{"language":"en","tag":"Catalogs","count":9},{"language":"en","tag":"MCP Tools","count":9},{"language":"pt-BR","tag":"Catálogos","count":9},{"language":"pt-BR","tag":"MCP Tools","count":9},{"language":"default","tag":"Search API v1","count":8},{"language":"en","tag":"Feed API","count":7},{"language":"en","tag":"Surfaces","count":7},{"language":"pt-BR","tag":"Feed API","count":7},{"language":"pt-BR","tag":"Surfaces","count":7},{"language":"default","tag":"Analytics","count":4},{"language":"default","tag":"Platform Adapters","count":4},{"language":"default","tag":"Platform Guides","count":3},{"language":"default","tag":"Reference","count":1},{"language":"default","tag":"Documentation","count":1},{"language":"default","tag":"Guides","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@alana.shopping","showHelpButton":true}},"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":"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}],"starterQuestions":[{"_id":"6992b47b0c445a8a6e628d35","deploymentId":"69913976347571420d709ca3","questionText":"How do I authenticate with the API?","status":"active","generatedBy":"manual","createdAt":"2026-02-16T06:08:59.400Z","updatedAt":"2026-02-16T06:08:59.400Z","__v":0},{"_id":"6992b4640c445a8a6e628d26","deploymentId":"69913976347571420d709ca3","questionText":"How does the AI content engine work?","status":"active","generatedBy":"manual","createdAt":"2026-02-16T06:08:36.976Z","updatedAt":"2026-02-16T06:08:36.976Z","__v":0},{"_id":"6992b44e0c445a8a6e628cf8","deploymentId":"69913976347571420d709ca3","questionText":"How do I create my first product catalog?","status":"active","generatedBy":"manual","createdAt":"2026-02-16T06:08:14.847Z","updatedAt":"2026-02-16T06:08:14.847Z","__v":0}],"isAtlas":false,"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"pt/guides/webhooks","slug":"/pt/guides/webhooks","pageMetadata":{"title":"Webhooks","description":"Receba notificações em tempo real para eventos de assinatura e pagamento.","icon":"webhook","href":"/pt/guides/webhooks"},"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: \"Receba notificações em tempo real para eventos de assinatura e pagamento.\"\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={code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._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(Heading,{level:`2`,id:`visão-geral`,children:`Visão geral`}),`\n`,_jsx(_components.p,{children:`Alana Shopping envia eventos de webhook para mudanças de cobrança e assinatura via Stripe. Sua aplicação pode escutar esses eventos para automatizar fluxos de trabalho.`}),`\n`,_jsx(Heading,{level:`2`,id:`eventos-suportados`,children:`Eventos suportados`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Evento`}),_jsx(_components.th,{children:`Descrição`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`checkout.session.completed`})}),_jsx(_components.td,{children:`Cliente completou uma sessão de checkout`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`customer.subscription.created`})}),_jsx(_components.td,{children:`Nova assinatura criada`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`customer.subscription.updated`})}),_jsx(_components.td,{children:`Plano de assinatura alterado, renovado ou modificado`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`customer.subscription.deleted`})}),_jsx(_components.td,{children:`Assinatura cancelada`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invoice.paid`})}),_jsx(_components.td,{children:`Pagamento de fatura bem-sucedido`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invoice.payment_failed`})}),_jsx(_components.td,{children:`Falha no pagamento da fatura`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`segurança-de-webhook`,children:`Segurança de webhook`}),`\n`,_jsx(_components.p,{children:`Todos os payloads de webhook são assinados pelo Stripe. Sempre verifique a assinatura antes de processar:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`24`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Stripe`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'stripe'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` stripe`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Stripe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`STRIPE_SECRET_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` body`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` signature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'stripe-signature'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` event`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` stripe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`webhooks`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`constructEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`STRIPE_WEBHOOK_SECRET`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Processar o evento verificado`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` switch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` case`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'customer.subscription.updated'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Atualizar plano do workspace`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` break`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` case`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'invoice.payment_failed'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Notificar owner do workspace`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` break`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Nunca processe eventos de webhook sem verificar a assinatura do Stripe. Webhooks não verificados podem ser falsificados por atores maliciosos.`})}),`\n`,_jsx(Heading,{level:`2`,id:`política-de-retry`,children:`Política de retry`}),`\n`,_jsxs(_components.p,{children:[`Stripe tenta novamente entregas de webhook falhadas com backoff exponencial por até 3 dias. Garanta que seu endpoint retorne um código de status `,_jsx(_components.code,{children:`200`}),` prontamente para evitar retentativas.`]})]})}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","description":"Receba notificações em tempo real para eventos de assinatura e pagamento.","icon":"webhook","href":"/pt/guides/webhooks"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Visão geral","slug":"visão-geral","depth":2,"children":[]},{"title":"Eventos suportados","slug":"eventos-suportados","depth":2,"children":[]},{"title":"Segurança de webhook","slug":"segurança-de-webhook","depth":2,"children":[]},{"title":"Política de retry","slug":"política-de-retry","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"alana","siteName":"Alana Shopping B2B","title":"Webhooks - Alana Shopping B2B","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"pt-BR":{"href":"/pt/guides/webhooks","matchLevel":0},"en":{"href":"/en/guides/webhooks","matchLevel":1}}},"lastModified":"2026-02-16T16:16:01.343Z","gitLastModified":"2026-02-16T16:10:50.000Z","originalFileLocation":"pt/guides/webhooks.mdx","locale":"pt-BR"},"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=\"Receba notificações em tempo real para eventos de assinatura e pagamento.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Alana Shopping B2B\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"noindex, nofollow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/alana/mahZg_WJDAlT0TRo/_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/alana/mahZg_WJDAlT0TRo/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/alana/mahZg_WJDAlT0TRo/_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/alana/mahZg_WJDAlT0TRo/_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/alana/mahZg_WJDAlT0TRo/_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/alana/mahZg_WJDAlT0TRo/_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/alana/mahZg_WJDAlT0TRo/_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/alana/mahZg_WJDAlT0TRo/_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/alana/mahZg_WJDAlT0TRo/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Webhooks - Alana Shopping B2B\">\u003cmeta data-mint-head property=\"og:description\" content=\"Receba notificações em tempo real para eventos de assinatura e pagamento.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Alana Shopping B2B\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.alana.shopping/pt/guides/webhooks\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://alana.mintlify.app/_mintlify/api/og/v2?division=Guias\u0026amp;title=Webhooks\u0026amp;description=Receba+notifica%C3%A7%C3%B5es+em+tempo+real+para+eventos+de+assinatura+e+pagamento.\u0026amp;theme=751e9dfaae674d63c87e5ec3\u0026amp;signature=6bb2df18b2d8d206a024e741fabb238175b890ce6bdc4a5fb8a00c4f0b03373b\">\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 - Alana Shopping B2B\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Receba notificações em tempo real para eventos de assinatura e pagamento.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://alana.mintlify.app/_mintlify/api/og/v2?division=Guias\u0026amp;title=Webhooks\u0026amp;description=Receba+notifica%C3%A7%C3%B5es+em+tempo+real+para+eventos+de+assinatura+e+pagamento.\u0026amp;theme=751e9dfaae674d63c87e5ec3\u0026amp;signature=6bb2df18b2d8d206a024e741fabb238175b890ce6bdc4a5fb8a00c4f0b03373b\">\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/alana/mahZg_WJDAlT0TRo/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Alana Shopping B2B\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ff8086\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.alana.shopping/pt/guides/webhooks\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/pt/guides/webhooks.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.alana.shopping/#organization\",\"name\":\"Alana Shopping B2B\",\"url\":\"https://docs.alana.shopping\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/alana/Dr3xX14a3TaLPBgT/images/logo.svg?fit=max\u0026auto=format\u0026n=Dr3xX14a3TaLPBgT\u0026q=85\u0026s=f8ceb81884ba65a782265580405c98e3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.alana.shopping#website\",\"name\":\"Alana Shopping B2B\",\"url\":\"https://docs.alana.shopping\",\"publisher\":{\"@id\":\"https://docs.alana.shopping/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.alana.shopping/pt/guides/webhooks#webpage\",\"url\":\"https://docs.alana.shopping/pt/guides/webhooks\",\"name\":\"Webhooks\",\"description\":\"Receba notificações em tempo real para eventos de assinatura e pagamento.\",\"dateModified\":\"2026-02-16T16:10:50.000Z\",\"isPartOf\":{\"@id\":\"https://docs.alana.shopping#website\"},\"breadcrumb\":{\"@id\":\"https://docs.alana.shopping/pt/guides/webhooks#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.alana.shopping/pt/guides/webhooks#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guias\",\"item\":\"https://docs.alana.shopping/pt/guides/onboarding-flow\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Webhooks\",\"item\":\"https://docs.alana.shopping/pt/guides/webhooks\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.alana.shopping/pt/guides/webhooks#article\",\"headline\":\"Webhooks\",\"name\":\"Webhooks\",\"description\":\"Receba notificações em tempo real para eventos de assinatura e pagamento.\",\"url\":\"https://docs.alana.shopping/pt/guides/webhooks\",\"mainEntityOfPage\":{\"@id\":\"https://docs.alana.shopping/pt/guides/webhooks#webpage\"},\"dateModified\":\"2026-02-16T16:10:50.000Z\",\"publisher\":{\"@id\":\"https://docs.alana.shopping/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.alana.shopping#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Alana Shopping B2B\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Alana Shopping B2B","nav":{"global":null,"languages":[{"language":"pt-BR","default":true,"tabs":[{"tab":"Central de Ajuda","icon":"life-ring","pages":[{"title":"Central de Ajuda","href":"/pt/help/welcome"}]},{"tab":"Documentação","groups":[{"group":"Primeiros Passos","pages":[{"title":"Alana Shopping B2B","href":"/pt/introduction"},{"title":"Início Rápido","href":"/pt/quickstart"},{"title":"Autenticação","href":"/pt/authentication"}]},{"group":"Conceitos Fundamentais","pages":[{"title":"Workspaces","icon":"building","href":"/pt/concepts/workspaces"},{"title":"Marcas","icon":"tag","href":"/pt/concepts/brands"},{"title":"Catálogos","icon":"folder-open","href":"/pt/concepts/catalogs"},{"title":"Produtos","icon":"box","href":"/pt/concepts/products"},{"title":"Motor de IA","icon":"sparkles","href":"/pt/concepts/ai-engine"},{"title":"Funções e Permissões","icon":"shield","href":"/pt/concepts/roles-permissions"},{"title":"Pipeline de Dados","icon":"workflow","href":"/pt/concepts/data-pipeline"},{"title":"Marketplace Hub","icon":"store","href":"/pt/concepts/marketplace"},{"title":"Surfaces","icon":"layout","href":"/pt/concepts/surfaces"},{"title":"Dashboards Configuráveis","icon":"chart-bar","href":"/pt/concepts/dashboards"}]},{"group":"Guias","pages":[{"title":"Fluxo de Onboarding","icon":"route","href":"/pt/guides/onboarding-flow"},{"title":"Gerenciamento de Catálogos","icon":"folder-open","href":"/pt/guides/catalog-management"},{"title":"Geração de Conteúdo com IA","icon":"sparkles","href":"/pt/guides/ai-content-generation"},{"title":"Geração de Conteúdo por Surface","icon":"sparkles","href":"/pt/guides/surface-content-generation"},{"title":"Importação de Produtos","icon":"upload","href":"/pt/guides/product-import"},{"title":"Integrações","icon":"plug","href":"/pt/guides/integrations"},{"title":"Planos e Cobrança","description":"Planos de assinatura, limites de uso e gerenciamento de cobrança.","icon":"credit-card","href":"/pt/guides/billing-plans"},{"title":"Webhooks","icon":"webhook","href":"/pt/guides/webhooks"},{"title":"Enriquecimento de Dados","description":"Guia completo para enriquecer dados de produtos pelo pipeline Bronze → Silver → Gold, incluindo web scraping via Bright Data e análise SERP.","icon":"sparkles","href":"/pt/guides/data-enrichment"},{"title":"Publicação no Marketplace","icon":"send","href":"/pt/guides/marketplace-publishing"},{"title":"Import por URL","icon":"link","href":"/pt/guides/url-import"},{"title":"Ações em Lote","icon":"list-checks","href":"/pt/guides/batch-actions"},{"title":"Configurações do Pipeline","icon":"settings","href":"/pt/guides/pipeline-settings"},{"title":"SDK TypeScript","icon":"npm","href":"/pt/guides/sdk-typescript"},{"title":"Observability","href":"/observability"}]}]},{"tab":"Referência da API","pages":[{"title":"Referência da API","href":"/pt/api-reference/overview"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/pt/changelog/overview"}]},{"tab":"Status do Sistema","icon":"signal","href":"https://status.alana.shopping"}]},{"language":"en","pages":[{"title":"en","href":"/en/guides/webhooks"}]}]},"title":"Webhooks - Alana Shopping B2B","buildId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","deploymentId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","dynamics":[],"chunks":[]}