Tesouro can sign webhook deliveries with HMAC-SHA512 so you can verify a request came from Tesouro and wasn’t tampered with. Signing is opt-in per subscription - unsigned by default. Once enabled, every delivery to that subscription includes the three headers below.To enable signing for your subscription, contact your Tesouro implementation team.
Signature header. v1=<hex> is the 128-character uppercase hex HMAC-SHA512 digest. t=<unix-seconds> is the send-time Tesouro stamped on the request, included in the signed input - use it for replay-window checks (see Replay protection).
x-tesouro-key-id
prod-key-2026-01
Identifier of the signing key Tesouro used. Use it to select the matching shared secret - Tesouro supports overlapping keys during rotation.
{t} is the unix-seconds value from x-tesouro-signature. {request_body} is the raw request body bytes, byte-for-byte as received - don’t re-serialize or reformat the JSON before hashing. Compare case-insensitively (the digest is uppercase on the wire).
After verifying the signature, also check that the request is fresh:
Reject stale requests. Compare t=<unix-seconds> from x-tesouro-signature to the current time and reject anything older than a small window (Tesouro recommends 5 minutes).
Deduplicate on deliveryId. Maintain a cache of recently-seen deliveryId values from the envelope and reject any request whose deliveryId you’ve already processed.
Tesouro also supports mutual TLS (mTLS) - contact the implementation team to enable it.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Tesouro","description":"Guides, references, and resources to integrate with the Tesouro platform.","colors":{"primary":"#8b5cf6","light":"#8b5cf6","dark":"#8b5cf6"},"logo":{"light":"https://mintcdn.com/tesouro-dc896113/EiyyRmHDHMxOKA4r/.shared/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=EiyyRmHDHMxOKA4r\u0026q=85\u0026s=7806042ddc87fa143686df9c7b515c71","dark":"https://mintcdn.com/tesouro-dc896113/EiyyRmHDHMxOKA4r/.shared/logo/logo-dark.svg?fit=max\u0026auto=format\u0026n=EiyyRmHDHMxOKA4r\u0026q=85\u0026s=055476f7bf095ab7104d5f0dc91bd674"},"favicon":"https://mintcdn.com/tesouro-dc896113/OrJhEQvpoHU_GZRr/.shared/logo/favicon.ico?fit=max\u0026auto=format\u0026n=OrJhEQvpoHU_GZRr\u0026q=85\u0026s=3619a3722b157ddf06545cfe36402ec6","background":{"color":{"dark":"#121212"}},"navbar":{"links":[{"href":"/contact","label":"Support"}]},"fonts":{"family":"Figtree"},"integrations":{"posthog":{"apiKey":"phc_Y5Ie0oFk2jzq4TnDcK0SbVtj7HzeVRUqFoC9hJsOV8j"}},"metadata":{"timestamp":false},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"tesouro-dc896113","hasAudioNarration":false,"actualSubdomain":"tesouro-dc896113","customDomains":["docs.tesouro.com"],"gitSource":{"type":"github","owner":"tesourohq","repo":"tesouro.platform.frontends.docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adfce3b728ed5a3208384b0","collectionId":"4e256b65-7121-48dc-b374-8d3cbdb7a264","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adfce3b728ed5a3208384b0"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adfce3b728ed5a3208384b0","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"API reference","count":809},{"language":"default","tag":"FinOps","count":486},{"language":"default","tag":"Acquiring","count":330},{"language":"default","tag":"Types","count":318},{"language":"default","tag":"Guides","count":194},{"language":"default","tag":"Underwriting","count":150},{"language":"default","tag":"Accounts receivable","count":113},{"language":"default","tag":"Embedded Banking","count":110},{"language":"default","tag":"Accounts payable","count":62},{"language":"default","tag":"Organization \u0026 access","count":61}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"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":"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":true},"customCss":[{"filePath":"styles.css","content":".vertical-image img{max-height:400px;width:auto}.no-line-numbers .code-block-line-gutter>span{display:none}.no-line-numbers .code-block-line-content>.line{display:inline-block}#content-area a code{z-index:0!important}svg#mermaid-svg,svg.statediagram{display:block;margin:auto}.method-pill+[data-component-part=scroll-area] [data-component-part=scroll-area-viewport]{direction:rtl}.method-pill+[data-component-part=scroll-area] [data-component-part=scroll-area-viewport]>*{direction:ltr}"}],"page":{"pagePath":"embedded-banking/guides/webhooks/security","slug":"/embedded-banking/guides/webhooks/security","pageMetadata":{"title":"Webhook security","description":"Verify webhook authenticity using HMAC signatures and follow endpoint security best practices.","href":"/embedded-banking/guides/webhooks/security"},"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: \"Verify webhook authenticity using HMAC signatures and follow endpoint security best practices.\"\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`,ol:`ol`,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(Heading,{level:`2`,id:`signature-verification`,children:`Signature verification`}),`\n`,_jsxs(_components.p,{children:[`Tesouro can sign webhook deliveries with HMAC-SHA512 so you can verify a request came from Tesouro and wasn’t tampered with. Signing is `,_jsx(_components.strong,{children:`opt-in per subscription`}),` - unsigned by default. Once enabled, every delivery to that subscription includes the three headers below.`]}),`\n`,_jsx(_components.p,{children:`To enable signing for your subscription, contact your Tesouro implementation team.`}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Header`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Example value`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`x-tesouro-signature`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`t=1746673883,v1=A1B2C3...DEF0`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Signature header. `,_jsx(_components.code,{children:`v1=\u003chex>`}),` is the 128-character uppercase hex HMAC-SHA512 digest. `,_jsx(_components.code,{children:`t=\u003cunix-seconds>`}),` is the send-time Tesouro stamped on the request, included in the signed input - use it for replay-window checks (see `,_jsx(_components.a,{href:`#replay-protection`,children:`Replay protection`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`x-tesouro-key-id`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`prod-key-2026-01`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Identifier of the signing key Tesouro used. Use it to select the matching shared secret - Tesouro supports overlapping keys during rotation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`x-tesouro-algorithm`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`hmac-sha512`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Algorithm used. Currently always `,_jsx(_components.code,{children:`hmac-sha512`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`computing-the-signature`,children:`Computing the signature`}),`\n`,_jsx(CodeBlock,{numberOfLines:`3`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`signed_input = \"{t}.{request_body}\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`v1 = HEX( HMAC-SHA512( secret, signed_input ) )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`{t}`}),` is the unix-seconds value from `,_jsx(_components.code,{children:`x-tesouro-signature`}),`. `,_jsx(_components.code,{children:`{request_body}`}),` is the raw request body bytes, byte-for-byte as received - don’t re-serialize or reformat the JSON before hashing. Compare case-insensitively (the digest is uppercase on the wire).`]}),`\n`,_jsx(Heading,{level:`3`,id:`verification-steps`,children:`Verification steps`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Extract `,_jsx(_components.code,{children:`t=\u003cunix-seconds>`}),` and `,_jsx(_components.code,{children:`v1=\u003chex>`}),` from the `,_jsx(_components.code,{children:`x-tesouro-signature`}),` header.`]}),`\n`,_jsxs(_components.li,{children:[`Look up the shared secret for the key id in `,_jsx(_components.code,{children:`x-tesouro-key-id`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Construct `,_jsx(_components.code,{children:`signed_input = \"{t}.{raw_body}\"`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Compute `,_jsx(_components.code,{children:`HEX(HMAC-SHA512(secret, signed_input))`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Reject with `,_jsx(_components.code,{children:`401`}),` if the computed digest doesn’t match `,_jsx(_components.code,{children:`v1`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Example using `,_jsx(_components.code,{children:`openssl`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SECRET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cyour shared secret>\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`T`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cunix-seconds value from x-tesouro-signature>\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`EXPECTED`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$( { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`printf`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '%s.'`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$T`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`cat`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` request-body.json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` openssl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` dgst`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sha512`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -hmac`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$SECRET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -hex`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` awk`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{print toupper($2)}'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`echo`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$EXPECTED`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`If signing is enabled for your subscription, always verify the signature before processing the event.`})}),`\n`,_jsx(Heading,{level:`2`,id:`replay-protection`,children:`Replay protection`}),`\n`,_jsx(_components.p,{children:`After verifying the signature, also check that the request is fresh:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Reject stale requests.`}),` Compare `,_jsx(_components.code,{children:`t=\u003cunix-seconds>`}),` from `,_jsx(_components.code,{children:`x-tesouro-signature`}),` to the current time and reject anything older than a small window (Tesouro recommends 5 minutes).`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Deduplicate on `,_jsx(_components.code,{children:`deliveryId`}),`.`]}),` Maintain a cache of recently-seen `,_jsx(_components.code,{children:`deliveryId`}),` values from the envelope and reject any request whose `,_jsx(_components.code,{children:`deliveryId`}),` you’ve already processed.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`secret-rotation`,children:`Secret rotation`}),`\n`,_jsx(_components.p,{children:`Signing secrets can be rotated without downtime:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Add the new secret before removing the old one.`}),`\n`,_jsxs(_components.li,{children:[`During the rotation period, accept requests signed by either key - use `,_jsx(_components.code,{children:`x-tesouro-key-id`}),` to select the matching secret per request.`]}),`\n`,_jsx(_components.li,{children:`Remove the old secret only after all in-flight webhooks finish.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Contact Tesouro support to rotate your webhook signing secret.`}),`\n`,_jsx(Heading,{level:`2`,id:`endpoint-validation`,children:`Endpoint validation`}),`\n`,_jsx(_components.p,{children:`In addition to signature verification:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Register only HTTPS endpoints; plain HTTP isn’t supported.`}),`\n`,_jsx(_components.li,{children:`Where possible, restrict your webhook handler to known Tesouro source IPs.`}),`\n`,_jsxs(_components.li,{children:[`Return `,_jsx(_components.code,{children:`401`}),` for requests that fail validation.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`additional-options`,children:`Additional options`}),`\n`,_jsx(_components.p,{children:`Tesouro also supports mutual TLS (mTLS) - contact the implementation team to enable it.`})]})}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":"Webhook security","description":"Verify webhook authenticity using HMAC signatures and follow endpoint security best practices.","href":"/embedded-banking/guides/webhooks/security"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Signature verification","slug":"signature-verification","depth":2,"children":[{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Computing the signature","slug":"computing-the-signature","depth":3,"children":[]},{"title":"Verification steps","slug":"verification-steps","depth":3,"children":[]}]},{"title":"Replay protection","slug":"replay-protection","depth":2,"children":[]},{"title":"Secret rotation","slug":"secret-rotation","depth":2,"children":[]},{"title":"Endpoint validation","slug":"endpoint-validation","depth":2,"children":[]},{"title":"Additional options","slug":"additional-options","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"tesouro-dc896113","siteName":"Tesouro","title":"Webhook security - Tesouro","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-12T12:33:01.027Z","originalFileLocation":"embedded-banking/guides/webhooks/security.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=\"Verify webhook authenticity using HMAC signatures and follow endpoint security best practices.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Tesouro\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tesouro-dc896113/7Bbt6o3aeKao26ng/_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/tesouro-dc896113/7Bbt6o3aeKao26ng/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tesouro-dc896113/7Bbt6o3aeKao26ng/_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/tesouro-dc896113/7Bbt6o3aeKao26ng/_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/tesouro-dc896113/7Bbt6o3aeKao26ng/_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/tesouro-dc896113/7Bbt6o3aeKao26ng/_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/tesouro-dc896113/7Bbt6o3aeKao26ng/_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/tesouro-dc896113/7Bbt6o3aeKao26ng/_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/tesouro-dc896113/7Bbt6o3aeKao26ng/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Webhook security - Tesouro\">\u003cmeta data-mint-head property=\"og:description\" content=\"Verify webhook authenticity using HMAC signatures and follow endpoint security best practices.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Tesouro\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.tesouro.com/embedded-banking/guides/webhooks/security\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://tesouro-dc896113.mintlify.app/_mintlify/api/og/v2?division=Webhooks\u0026amp;title=Webhook+security\u0026amp;description=Verify+webhook+authenticity+using+HMAC+signatures+and+follow+endpoint+security+best+practices.\u0026amp;theme=aea269d490030ed12aee6415\u0026amp;signature=dd9f02038c6d384ac048d43a14b7c9826c601b05642b171e4b15a1828975208f\">\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=\"Webhook security - Tesouro\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Verify webhook authenticity using HMAC signatures and follow endpoint security best practices.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://tesouro-dc896113.mintlify.app/_mintlify/api/og/v2?division=Webhooks\u0026amp;title=Webhook+security\u0026amp;description=Verify+webhook+authenticity+using+HMAC+signatures+and+follow+endpoint+security+best+practices.\u0026amp;theme=aea269d490030ed12aee6415\u0026amp;signature=dd9f02038c6d384ac048d43a14b7c9826c601b05642b171e4b15a1828975208f\">\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/tesouro-dc896113/7Bbt6o3aeKao26ng/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Tesouro\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#8b5cf6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.tesouro.com/embedded-banking/guides/webhooks/security\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/embedded-banking/guides/webhooks/security.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.tesouro.com/#organization\",\"name\":\"Tesouro\",\"url\":\"https://docs.tesouro.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/tesouro-dc896113/EiyyRmHDHMxOKA4r/.shared/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=EiyyRmHDHMxOKA4r\u0026q=85\u0026s=7806042ddc87fa143686df9c7b515c71\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.tesouro.com#website\",\"name\":\"Tesouro\",\"url\":\"https://docs.tesouro.com\",\"publisher\":{\"@id\":\"https://docs.tesouro.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.tesouro.com/embedded-banking/guides/webhooks/security#webpage\",\"url\":\"https://docs.tesouro.com/embedded-banking/guides/webhooks/security\",\"name\":\"Webhook security\",\"description\":\"Verify webhook authenticity using HMAC signatures and follow endpoint security best practices.\",\"dateModified\":\"2026-05-12T12:33:01.027Z\",\"isPartOf\":{\"@id\":\"https://docs.tesouro.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.tesouro.com/embedded-banking/guides/webhooks/security#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.tesouro.com/embedded-banking/guides/webhooks/security#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Webhooks\",\"item\":\"https://docs.tesouro.com/embedded-banking/guides/webhooks/index\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Webhook security\",\"item\":\"https://docs.tesouro.com/embedded-banking/guides/webhooks/security\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.tesouro.com/embedded-banking/guides/webhooks/security#article\",\"headline\":\"Webhook security\",\"name\":\"Webhook security\",\"description\":\"Verify webhook authenticity using HMAC signatures and follow endpoint security best practices.\",\"url\":\"https://docs.tesouro.com/embedded-banking/guides/webhooks/security\",\"mainEntityOfPage\":{\"@id\":\"https://docs.tesouro.com/embedded-banking/guides/webhooks/security#webpage\"},\"dateModified\":\"2026-05-12T12:33:01.027Z\",\"publisher\":{\"@id\":\"https://docs.tesouro.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.tesouro.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Tesouro\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Tesouro","nav":{"global":null,"products":[{"product":"Home","icon":"house","description":"Documentation hub for all Tesouro products and platform guides","pages":[{"title":"Home","href":""}]},{"product":"Acquiring","icon":"credit-card","description":"Acceptor boarding, transaction processing, billing, funding, and dispute management","pages":[{"title":"Acquiring","href":"/acquiring"}]},{"product":"Embedded Banking","icon":"building-columns","description":"Integrate banking and finance tools directly within your software","tabs":[{"tab":"Guides","pages":[{"title":"Embedded Banking","sidebarTitle":"Introduction","mode":"wide","href":"/embedded-banking"},{"group":"Getting started","pages":[{"title":"Server-side quickstart","sidebarTitle":"Server-side quickstart","href":"/embedded-banking/guides/quickstart/server-side"},{"group":"API concepts","root":{"title":"API concepts","sidebarTitle":"Getting started","href":"/embedded-banking/guides/getting-started"},"pages":[{"title":"Quick reference","sidebarTitle":"Quick reference","href":"/embedded-banking/api/concepts/quick-reference"},{"title":"Environments","href":"/embedded-banking/api/concepts/environments"},{"title":"Rate limiting","href":"/embedded-banking/api/concepts/rate-limiting"},{"title":"Pagination, sorting, and filtering","href":"/embedded-banking/api/concepts/pagination-sorting-filtering"},{"title":"Playground","href":"/embedded-banking/api/concepts/playground"}]},{"title":"Testing","sidebarTitle":"Testing","href":"/embedded-banking/guides/testing/about"}]},{"group":"Authentication","pages":[{"title":"Overview","href":"/embedded-banking/guides/authentication/overview"},{"title":"Client credentials","href":"/embedded-banking/guides/authentication/client-credentials"},{"title":"User token","href":"/embedded-banking/guides/authentication/user-token"},{"title":"Application client secret","href":"/embedded-banking/guides/authentication/application-client-secret"}]},{"group":"Organizations","pages":[{"title":"Organizations","sidebarTitle":"Overview","href":"/embedded-banking/guides/organizations/overview"},{"title":"What KYB collects","sidebarTitle":"KYB data","href":"/embedded-banking/guides/organizations/kyb-data"},{"title":"Onboarding outcomes","sidebarTitle":"Outcomes","href":"/embedded-banking/guides/organizations/outcomes"}]},{"group":"Users","pages":[{"title":"Users","sidebarTitle":"Overview","href":"/embedded-banking/guides/users/overview"},{"title":"API access","sidebarTitle":"API access","href":"/embedded-banking/guides/users/api-access"},{"title":"Authorized users","sidebarTitle":"Authorized users","href":"/embedded-banking/guides/users/authorized-users"}]},{"group":"Bank account applications","pages":[{"title":"Bank account applications","sidebarTitle":"Overview","href":"/embedded-banking/guides/bank-account-applications/overview"},{"title":"Creating an application","sidebarTitle":"Creating an application","href":"/embedded-banking/guides/bank-account-applications/creating"},{"title":"Pre-populating an application","sidebarTitle":"Pre-populating","href":"/embedded-banking/guides/bank-account-applications/pre-populating"},{"title":"Editing and submitting","sidebarTitle":"Editing and submitting","href":"/embedded-banking/guides/bank-account-applications/submitting"},{"title":"Resuming a stale application","sidebarTitle":"Resuming","href":"/embedded-banking/guides/bank-account-applications/resuming"}]},{"group":"Bank accounts","pages":[{"title":"Bank accounts","sidebarTitle":"Overview","href":"/embedded-banking/guides/bank-accounts/overview"},{"title":"Internal bank accounts","sidebarTitle":"Internal bank accounts","href":"/embedded-banking/guides/bank-accounts/internal-accounts"},{"title":"Closing a bank account","sidebarTitle":"Closing a bank account","href":"/embedded-banking/guides/bank-accounts/closing-accounts"},{"title":"External bank accounts","sidebarTitle":"External bank accounts","href":"/embedded-banking/guides/bank-accounts/external-accounts"},{"title":"Linking an external bank account","sidebarTitle":"Linking an external bank account","href":"/embedded-banking/guides/bank-accounts/linking-external-accounts"},{"title":"Daily balance export","sidebarTitle":"Daily balance export","href":"/embedded-banking/guides/bank-accounts/daily-balance-export"},{"title":"Troubleshooting","sidebarTitle":"Troubleshooting","href":"/embedded-banking/guides/bank-accounts/troubleshooting"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","sidebarTitle":"Webhooks","href":"/embedded-banking/guides/webhooks/index"},{"title":"Managing subscriptions","href":"/embedded-banking/guides/webhooks/managing-subscriptions"},{"title":"Event types","href":"/embedded-banking/guides/webhooks/event-types"},{"title":"Delivery and retry behavior","description":"Understand how Tesouro delivers webhook events, retries failed deliveries, and how to handle them reliably.","href":"/embedded-banking/guides/webhooks/delivery-and-retry-behavior"},{"title":"Webhook security","href":"/embedded-banking/guides/webhooks/security"},{"title":"Monitoring webhooks","description":"Track webhook delivery attempts, view event history, and diagnose failed deliveries for your integrations.","href":"/embedded-banking/guides/webhooks/monitoring-webhooks"}]},{"group":"Money movement","pages":[{"title":"Money movement","sidebarTitle":"Overview","href":"/embedded-banking/guides/money-movement/overview"},{"title":"Internal transfers","sidebarTitle":"Internal transfers","href":"/embedded-banking/guides/money-movement/internal-transfers"},{"title":"ACH transfers","sidebarTitle":"ACH","href":"/embedded-banking/guides/money-movement/ach"},{"title":"RTP","sidebarTitle":"RTP","href":"/embedded-banking/guides/money-movement/rtp"},{"title":"FedNow","sidebarTitle":"FedNow","href":"/embedded-banking/guides/money-movement/fednow"},{"title":"Lifecycle \u0026 idempotency","sidebarTitle":"Lifecycle \u0026 idempotency","href":"/embedded-banking/guides/money-movement/lifecycle"}]},{"group":"Transactions","pages":[{"title":"Transactions","sidebarTitle":"Overview","href":"/embedded-banking/guides/transactions/overview"},{"title":"Transaction record shape","sidebarTitle":"Record shape","href":"/embedded-banking/guides/transactions/record-shape"},{"title":"Transaction pagination","sidebarTitle":"Pagination","href":"/embedded-banking/guides/transactions/pagination"},{"title":"Transaction filtering","sidebarTitle":"Filtering","href":"/embedded-banking/guides/transactions/filtering"},{"title":"Transaction CSV download","sidebarTitle":"CSV download","href":"/embedded-banking/guides/transactions/downloading-csv"}]},{"group":"White-label","pages":[{"title":"White-label application","sidebarTitle":"Overview","href":"/embedded-banking/guides/white-label"}]}]},{"tab":"Embedded components ↗","href":"https://components.tesouro.com/components?product=embedded-banking"},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/applications/list-applications"}]},{"tab":"Support","pages":[{"title":"Support","href":"/embedded-banking/support"}]}]},{"product":"FinOps","icon":"file-invoice-dollar","description":"Accounts payable, accounts receivable, invoicing, and expense management","pages":[{"title":"FinOps","href":"/finops"}]},{"product":"Underwriting","icon":"file-shield","description":"Submit KYB/KYC and financial information for underwriting review and decisioning","pages":[{"title":"Underwriting","href":"/underwriting"}]}]},"title":"Webhook security - Tesouro","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":[],"chunks":[]}