You can manage your registered webhooks directly from the dashboard:
Pause - Temporarily stop receiving webhook events without deleting the registration
Remove - Permanently delete the webhook registration
Ensure your webhook endpoint returns a 200 OK response quickly (within 5 seconds) to acknowledge receipt. Failed webhooks may be retried automatically. Redirects are not followed: any 3xx response counts as a failed delivery, so register the exact URL that answers.
Every webhook request is signed so you can verify it genuinely came from Crown and was not tampered with in transit. Signatures use RSA-SHA256 (PKCS#1 v1.5): Crown signs each request with its private key, and you verify it with Crown’s public key.
Use the following RSA public key to verify the X-Crown-Signature on incoming webhooks:
-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxQGZuqIeWH96kOId6SBDe4mMTAELlSw81WHt6E+ywk3FUhlUoRukRiwdMwK8laikd+7wdRd0ZTX6M3xwQtNb6AbvSLKBUgbFJzRD/vc5yCXO92p/mmRMzdDc9whp9iHWwpFgveAAfoiOcllZOKkiiNwHvnhpS2F0Ybxw9HaJqsgQ+g+h0e8lYrTAxlBEcQyE2LAwUDcBGVvXJZNLf5pn8ftmj5LE/7eF8LfzJQbinQXr0xZXkAGwnuA9hzO8ofyrTH9IKtU9swomTSWwGh4NFH58pSn4eaIArJuvafnC+vgyRpviWc/rnpSNheGi+gpXEQlwXIRl0gDjfMul0EdOzwIDAQAB-----END PUBLIC KEY-----
Build the signed payload string: {timestamp}:{body}, where timestamp is the exact value of X-Request-Timestamp and body is the raw request body.
Compute the SHA256 digest of that payload string.
Sign the digest with RSA-SHA256 using Crown’s private key.
Base64-encode the result — this is the X-Crown-Signature value.
Because step 3 signs the SHA256 digest (and RSA-SHA256 applies SHA256 again internally), the signature effectively covers a double SHA256 of the payload. When verifying, hash the payload once yourself and pass that digest to the RSA-SHA256 verifier — do not pass the raw payload. This is the most common cause of verification failures.
Reconstruct the payload from the request you received, compute its SHA256 digest, and verify the signature against Crown’s public key. Use the raw request body exactly as received — do not re-serialize the JSON, as any difference in spacing or key order will break verification.
const crypto = require('crypto');function verifySignature(signature, timestamp, rawBody, publicKeyPem) { const payload = `${timestamp}:${rawBody}`; const hash = crypto.createHash('sha256').update(payload).digest(); const verifier = crypto.createVerify('RSA-SHA256'); verifier.update(hash); // pass the digest, not the raw payload verifier.end(); return verifier.verify(publicKeyPem, signature, 'base64');}// Usage (Express, with the raw body preserved)const isValid = verifySignature( req.headers['x-crown-signature'], req.headers['x-request-timestamp'], rawBody, publicKey,);
Also validate X-Request-Timestamp: reject requests whose timestamp is older than ~5 minutes to guard against replay attacks. Always serve your webhook endpoint over HTTPS.
You can allowlist it as an extra layer, but always verify the signature: it is what proves a request came from Crown.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Crown API Documentation","colors":{"primary":"#002804","light":"#DAD7C8","dark":"#002804"},"logo":{"light":"https://mintcdn.com/crown-2b36dce9/-If___UpDLMLlFoP/logo/light.svg?fit=max\u0026auto=format\u0026n=-If___UpDLMLlFoP\u0026q=85\u0026s=ac83b7b6f874f0613ee2d0c9a5ade601","dark":"https://mintcdn.com/crown-2b36dce9/-If___UpDLMLlFoP/logo/dark.svg?fit=max\u0026auto=format\u0026n=-If___UpDLMLlFoP\u0026q=85\u0026s=6cf82e209d2e6bd90fa78c7a47b9404d"},"favicon":"https://mintcdn.com/crown-2b36dce9/-If___UpDLMLlFoP/favicon.svg?fit=max\u0026auto=format\u0026n=-If___UpDLMLlFoP\u0026q=85\u0026s=aa30534896387d541312323082b55ff5","background":{"color":{"light":"#DAD7C8","dark":"#002804"}},"navbar":{"links":[{"href":"mailto:operations@crowndigital.xyz","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.crown-brlv.com"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/crown-brl"}},"fonts":{"heading":{"family":"Season Mix","weight":700,"source":"fonts/SeasonMix-Bold.woff2","format":"woff2"},"body":{"family":"Season Sans","weight":400,"source":"fonts/SeasonSans-Regular.woff2","format":"woff2"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"crown-2b36dce9","hasAudioNarration":false,"actualSubdomain":"crown-2b36dce9","customDomains":["docs.crown-brlv.com"],"gitSource":{"type":"github","owner":"crown-xyz","repo":"crown-api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6aed2df7b4b894b6ac609bcb","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API reference","count":80},{"language":"default","tag":"Claims","count":13},{"language":"default","tag":"Auto-claims","count":11},{"language":"default","tag":"Webhooks","count":10},{"language":"default","tag":"Withdrawals","count":9},{"language":"default","tag":"Guides","count":9},{"language":"default","tag":"Orders","count":7},{"language":"default","tag":"Accounts","count":6},{"language":"default","tag":"Deposits","count":5},{"language":"default","tag":"Wallets","count":5}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".crown-deprecated{--cd-oxblood: #b5454a;--cd-cream: #dad7c8;display:flex;align-items:center;gap:1rem 1.5rem;flex-wrap:wrap;margin:0 0 2rem;padding:0.875rem 1.25rem;border:1px solid color-mix(in srgb, var(--cd-oxblood) 28%, transparent);border-radius:0.75rem;background:color-mix(in srgb, var(--cd-oxblood) 10%, transparent);font-family:\"Season Sans\", ui-sans-serif, system-ui, sans-serif;animation:cd-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both}@keyframes cd-rise{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}.crown-deprecated__dot{flex:none;width:0.5rem;height:0.5rem;border-radius:50%;background:var(--cd-oxblood);box-shadow:0 0 0 4px color-mix(in srgb, var(--cd-oxblood) 18%, transparent)}.crown-deprecated__text{flex:1 1 16rem;margin:0;font-size:0.9375rem;line-height:1.45;color:color-mix(in srgb, #7a2e32 92%, black)}.crown-deprecated__text strong{font-weight:700;color:#7a2e32}.crown-deprecated__action{flex:none;display:inline-flex;align-items:center;gap:0.4rem;font-size:0.875rem;font-weight:600;white-space:nowrap;text-decoration:none;color:#7a2e32;transition:gap 0.18s ease, opacity 0.18s ease}.crown-deprecated__action:hover{gap:0.6rem;opacity:0.85}.dark .crown-deprecated{border-color:color-mix(in srgb, var(--cd-oxblood) 40%, transparent);background:color-mix(in srgb, var(--cd-oxblood) 16%, transparent)}.dark .crown-deprecated__text{color:color-mix(in srgb, var(--cd-cream) 88%, transparent)}.dark .crown-deprecated__text strong{color:var(--cd-cream)}.dark .crown-deprecated__dot{background:#e8868a;box-shadow:0 0 0 4px color-mix(in srgb, #e8868a 20%, transparent)}.dark .crown-deprecated__action{color:var(--cd-cream)}@media (prefers-reduced-motion: reduce){.crown-deprecated{animation:none}.crown-deprecated__action{transition:none}}:root{--cv-forest: #002804;--cv-cream: #dad7c8}div:has(>[data-component-part=\"version-select-trigger\"])::before{content:\"VERSION\";align-self:center;font-family:\"Season Sans\", ui-sans-serif, system-ui, sans-serif;font-size:0.6875rem;font-weight:600;letter-spacing:0.14em;color:color-mix(in srgb, var(--cv-forest) 48%, transparent)}[data-component-part=\"version-select-trigger\"]{border:1px solid color-mix(in srgb, var(--cv-forest) 22%, transparent);background:color-mix(in srgb, var(--cv-forest) 5%, transparent);border-radius:0.75rem;padding-top:0.375rem;padding-bottom:0.375rem;transition:border-color 0.18s ease, background 0.18s ease}[data-component-part=\"version-select-trigger\"]:hover{border-color:color-mix(in srgb, var(--cv-forest) 36%, transparent)}[data-component-part=\"version-select-trigger\"]>span{font-family:\"Season Mix\", Georgia, serif;font-weight:700;font-variant-numeric:tabular-nums}.dark div:has(>[data-component-part=\"version-select-trigger\"])::before{color:color-mix(in srgb, var(--cv-cream) 52%, transparent)}.dark [data-component-part=\"version-select-trigger\"]{border-color:color-mix(in srgb, var(--cv-cream) 22%, transparent);background:color-mix(in srgb, var(--cv-cream) 5%, transparent)}.dark [data-component-part=\"version-select-trigger\"]:hover{border-color:color-mix(in srgb, var(--cv-cream) 38%, transparent)}[data-component-part=\"version-select-item\"]>p{flex:0 0 auto}[data-component-part=\"version-select-item\"]>svg{margin-left:auto}"}],"page":{"pagePath":"guides/webhooks-setup","slug":"/guides/webhooks-setup","pageMetadata":{"title":"Webhooks Setup","description":"Configure webhooks to receive real-time notifications about events in your Crown account","href":"/guides/webhooks-setup"},"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: \"Configure webhooks to receive real-time notifications about events in your Crown account\"\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,CodeGroup,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,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:`access-management-console`,children:`Access Management Console`}),`\n`,_jsxs(_components.p,{children:[`Navigate to the `,_jsx(_components.strong,{children:`Manage Users`}),` section in your Crown dashboard to begin setting up webhooks.`]}),`\n`,_jsx(Heading,{level:`2`,id:`register-your-webhook-url`,children:`Register Your Webhook URL`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Enter your webhook endpoint URL in the `,_jsx(_components.strong,{children:`Webhook URL`}),` field (e.g., `,_jsx(_components.code,{children:`https://your-app.com/webhooks`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Register Webhook`})]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Your webhook will be immediately active and begin receiving events.`}),`\n`,_jsx(Heading,{level:`2`,id:`webhook-events`,children:`Webhook Events`}),`\n`,_jsx(_components.p,{children:`Your registered endpoint will receive POST requests for the following events:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`deposit-processed`}),` - When a deposit has been successfully processed`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`order-completed`}),` - When a currency conversion order completes`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`order-refund-initiated`}),` - When a PIX paying for an order arrives after the order expired and is being returned`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`token-transfer-completed`}),` - When a token transfer finishes`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`withdraw-completed`}),` - When a withdrawal is processed`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`claim-completed`}),` - When a yield claim is completed`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`/api-reference/webhooks/deposit-processed`,children:`Webhooks API Reference`}),` for detailed payload schemas.`]}),`\n`,_jsx(Heading,{level:`2`,id:`managing-webhooks`,children:`Managing Webhooks`}),`\n`,_jsx(_components.p,{children:`You can manage your registered webhooks directly from the dashboard:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Pause`}),` - Temporarily stop receiving webhook events without deleting the registration`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Remove`}),` - Permanently delete the webhook registration`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Ensure your webhook endpoint returns a `,_jsx(_components.code,{children:`200 OK`}),` response quickly (within 5 seconds) to acknowledge receipt. Failed webhooks may be retried automatically. Redirects are not followed: any `,_jsx(_components.code,{children:`3xx`}),` response counts as a failed delivery, so register the exact URL that answers.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`webhook-security`,children:`Webhook Security`}),`\n`,_jsxs(_components.p,{children:[`Every webhook request is signed so you can verify it genuinely came from Crown and was not tampered with in transit. Signatures use `,_jsx(_components.strong,{children:`RSA-SHA256`}),` (PKCS#1 v1.5): Crown signs each request with its private key, and you verify it with Crown’s public key.`]}),`\n`,_jsx(Heading,{level:`3`,id:`public-key`,children:`Public key`}),`\n`,_jsxs(_components.p,{children:[`Use the following RSA public key to verify the `,_jsx(_components.code,{children:`X-Crown-Signature`}),` on incoming webhooks:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,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:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`-----BEGIN PUBLIC KEY-----`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxQGZuqIeWH96kOId6SBD`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`e4mMTAELlSw81WHt6E+ywk3FUhlUoRukRiwdMwK8laikd+7wdRd0ZTX6M3xwQtNb`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`6AbvSLKBUgbFJzRD/vc5yCXO92p/mmRMzdDc9whp9iHWwpFgveAAfoiOcllZOKki`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`iNwHvnhpS2F0Ybxw9HaJqsgQ+g+h0e8lYrTAxlBEcQyE2LAwUDcBGVvXJZNLf5pn`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`8ftmj5LE/7eF8LfzJQbinQXr0xZXkAGwnuA9hzO8ofyrTH9IKtU9swomTSWwGh4N`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`FH58pSn4eaIArJuvafnC+vgyRpviWc/rnpSNheGi+gpXEQlwXIRl0gDjfMul0EdO`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`zwIDAQAB`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`-----END PUBLIC KEY-----`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`signature-headers`,children:`Signature headers`}),`\n`,_jsx(_components.p,{children:`Each request includes:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`X-Crown-Signature`})}),_jsx(_components.td,{children:`Base64-encoded RSA-SHA256 signature`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`X-Request-Timestamp`})}),_jsx(_components.td,{children:`Unix timestamp (seconds) used to build the signed payload`})]}),_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:`3`,id:`how-the-signature-is-generated`,children:`How the signature is generated`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Build the signed payload string: `,_jsx(_components.code,{children:`{timestamp}:{body}`}),`, where `,_jsx(_components.code,{children:`timestamp`}),` is the exact value of `,_jsx(_components.code,{children:`X-Request-Timestamp`}),` and `,_jsx(_components.code,{children:`body`}),` is the raw request body.`]}),`\n`,_jsxs(_components.li,{children:[`Compute the `,_jsx(_components.code,{children:`SHA256`}),` digest of that payload string.`]}),`\n`,_jsx(_components.li,{children:`Sign the digest with RSA-SHA256 using Crown’s private key.`}),`\n`,_jsxs(_components.li,{children:[`Base64-encode the result — this is the `,_jsx(_components.code,{children:`X-Crown-Signature`}),` value.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Because step 3 signs the SHA256 `,_jsx(_components.strong,{children:`digest`}),` (and RSA-SHA256 applies SHA256 again internally), the signature effectively covers a `,_jsx(_components.strong,{children:`double SHA256`}),` of the payload. When verifying, hash the payload once yourself and pass that digest to the RSA-SHA256 verifier — do not pass the raw payload. This is the most common cause of verification failures.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`verifying-the-signature`,children:`Verifying the signature`}),`\n`,_jsxs(_components.p,{children:[`Reconstruct the payload from the request you received, compute its SHA256 digest, and verify the signature against Crown’s public key. Use the `,_jsx(_components.strong,{children:`raw request body exactly as received`}),` — do not re-serialize the JSON, as any difference in spacing or key order will break verification.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`20`,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:`20`,children:[_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:` crypto`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'crypto'`}),_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:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` verifySignature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`signature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`timestamp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`rawBody`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`publicKeyPem`}),_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:` payload`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`timestamp`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`rawBody`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_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:` hash`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` crypto`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createHash`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sha256'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`digest`}),_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:` verifier`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` crypto`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createVerify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'RSA-SHA256'`}),_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:` verifier`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`hash`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// pass the digest, not the raw payload`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` verifier`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`end`}),_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:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` verifier`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`verify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`publicKeyPem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'base64'`}),_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`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Usage (Express, with the raw body preserved)`})}),`\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:` isValid`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` verifySignature`}),_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:` req`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'x-crown-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:` req`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'x-request-timestamp'`}),_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:` rawBody`}),_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:` publicKey`}),_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(CodeBlock,{filename:`Python`,numberOfLines:`18`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`18`,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\":`#D4D4D4`},children:` hashlib`})]}),`\n`,_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\":`#D4D4D4`},children:` base64`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` cryptography.hazmat.primitives `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hashes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` cryptography.hazmat.primitives.asymmetric `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` padding`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` verify_signature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`timestamp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`raw_body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`public_key`}),_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\":`#D4D4D4`},children:` payload `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`timestamp`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`raw_body`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload_hash `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hashlib.sha256(payload.encode()).digest()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_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:` public_key.verify(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` base64.b64decode(signature),`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload_hash, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# re-hashed by verify() -> effective double SHA256`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` padding.PKCS1v15(),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hashes.SHA256(),`})}),`\n`,_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` True`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` except`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Exception`}),_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:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` False`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`replay-protection`,children:`Replay protection`}),`\n`,_jsxs(_components.p,{children:[`Also validate `,_jsx(_components.code,{children:`X-Request-Timestamp`}),`: reject requests whose timestamp is older than ~5 minutes to guard against replay attacks. Always serve your webhook endpoint over HTTPS.`]}),`\n`,_jsx(Heading,{level:`3`,id:`source-ip`,children:`Source IP`}),`\n`,_jsx(_components.p,{children:`Every webhook is sent from this fixed IP:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,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:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`18.223.58.132`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`You can allowlist it as an extra layer, but always verify the signature: it is what proves a request came from Crown.`})]})}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 Setup","description":"Configure webhooks to receive real-time notifications about events in your Crown account","href":"/guides/webhooks-setup"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Access Management Console","slug":"access-management-console","depth":2,"children":[]},{"title":"Register Your Webhook URL","slug":"register-your-webhook-url","depth":2,"children":[]},{"title":"Webhook Events","slug":"webhook-events","depth":2,"children":[]},{"title":"Managing Webhooks","slug":"managing-webhooks","depth":2,"children":[]},{"title":"Webhook Security","slug":"webhook-security","depth":2,"children":[{"title":"Public key","slug":"public-key","depth":3,"children":[]},{"title":"Signature headers","slug":"signature-headers","depth":3,"children":[]},{"title":"How the signature is generated","slug":"how-the-signature-is-generated","depth":3,"children":[]},{"title":"Verifying the signature","slug":"verifying-the-signature","depth":3,"children":[]},{"title":"Replay protection","slug":"replay-protection","depth":3,"children":[]},{"title":"Source IP","slug":"source-ip","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"crown-2b36dce9","siteName":"Crown API Documentation","title":"Webhooks Setup - Crown API Documentation","navMaps":{"firstHrefInVersion":{"v1":{"href":"/guides/webhooks-setup","matchLevel":0},"v0":{"href":"/guides/webhooks-setup","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-11-06T01:31:42.704Z","originalFileLocation":"guides/webhooks-setup.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=\"Configure webhooks to receive real-time notifications about events in your Crown account\">\u003cmeta data-mint-head name=\"application-name\" content=\"Crown API Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/crown-2b36dce9/b-hZSpiTYtCRSAkK/_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/crown-2b36dce9/b-hZSpiTYtCRSAkK/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/crown-2b36dce9/b-hZSpiTYtCRSAkK/_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/crown-2b36dce9/b-hZSpiTYtCRSAkK/_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/crown-2b36dce9/b-hZSpiTYtCRSAkK/_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/crown-2b36dce9/b-hZSpiTYtCRSAkK/_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/crown-2b36dce9/b-hZSpiTYtCRSAkK/_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/crown-2b36dce9/b-hZSpiTYtCRSAkK/_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/crown-2b36dce9/b-hZSpiTYtCRSAkK/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Webhooks Setup - Crown API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Configure webhooks to receive real-time notifications about events in your Crown account\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Crown API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.crown-brlv.com/guides/webhooks-setup\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://crown-2b36dce9.mintlify.site/_mintlify/api/og/v2?division=Setup\u0026amp;title=Webhooks+Setup\u0026amp;description=Configure+webhooks+to+receive+real-time+notifications+about+events+in+your+Crown+account\u0026amp;theme=836d900ddc3ca50d0d899b9e\u0026amp;signature=b953cf759c003446335c7d6c58af60d80b7c2fb42ae2c6e3849b1dec133a0d15\">\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 Setup - Crown API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Configure webhooks to receive real-time notifications about events in your Crown account\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://crown-2b36dce9.mintlify.site/_mintlify/api/og/v2?division=Setup\u0026amp;title=Webhooks+Setup\u0026amp;description=Configure+webhooks+to+receive+real-time+notifications+about+events+in+your+Crown+account\u0026amp;theme=836d900ddc3ca50d0d899b9e\u0026amp;signature=b953cf759c003446335c7d6c58af60d80b7c2fb42ae2c6e3849b1dec133a0d15\">\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/crown-2b36dce9/b-hZSpiTYtCRSAkK/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Crown API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#002804\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.crown-brlv.com/guides/webhooks-setup\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/webhooks-setup.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.crown-brlv.com/#organization\",\"name\":\"Crown API Documentation\",\"url\":\"https://docs.crown-brlv.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/crown-2b36dce9/-If___UpDLMLlFoP/logo/light.svg?fit=max\u0026auto=format\u0026n=-If___UpDLMLlFoP\u0026q=85\u0026s=ac83b7b6f874f0613ee2d0c9a5ade601\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.crown-brlv.com#website\",\"name\":\"Crown API Documentation\",\"url\":\"https://docs.crown-brlv.com\",\"publisher\":{\"@id\":\"https://docs.crown-brlv.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.crown-brlv.com/guides/webhooks-setup#webpage\",\"url\":\"https://docs.crown-brlv.com/guides/webhooks-setup\",\"name\":\"Webhooks Setup\",\"description\":\"Configure webhooks to receive real-time notifications about events in your Crown account\",\"dateModified\":\"2026-11-06T01:31:42.704Z\",\"isPartOf\":{\"@id\":\"https://docs.crown-brlv.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.crown-brlv.com/guides/webhooks-setup#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.crown-brlv.com/guides/webhooks-setup#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Setup\",\"item\":\"https://docs.crown-brlv.com/guides/api-keys-setup\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Webhooks Setup\",\"item\":\"https://docs.crown-brlv.com/guides/webhooks-setup\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.crown-brlv.com/guides/webhooks-setup#article\",\"headline\":\"Webhooks Setup\",\"name\":\"Webhooks Setup\",\"description\":\"Configure webhooks to receive real-time notifications about events in your Crown account\",\"url\":\"https://docs.crown-brlv.com/guides/webhooks-setup\",\"mainEntityOfPage\":{\"@id\":\"https://docs.crown-brlv.com/guides/webhooks-setup#webpage\"},\"dateModified\":\"2026-11-06T01:31:42.704Z\",\"publisher\":{\"@id\":\"https://docs.crown-brlv.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.crown-brlv.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Crown API Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Crown API Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/webhooks-setup.md","siteName":"Crown API Documentation","nav":{"global":null,"versions":[{"version":"v1","default":true,"tag":"Latest","tabs":[{"tab":"Guides","groups":[{"group":"Getting started","pages":[{"title":"Introduction","href":""}]},{"group":"Setup","pages":[{"title":"API Keys Setup","description":"Learn how to create and configure API keys for authenticating with the Crown API","href":"/guides/api-keys-setup"},{"title":"Webhooks Setup","href":"/guides/webhooks-setup"}]},{"group":"Guides","pages":[{"title":"API Authentication","description":"Learn how to authenticate your API requests using JWT tokens","href":"/guides/authentication"},{"title":"Depositing BRL Funds","href":"/guides/deposits"},{"title":"Asset Conversions","href":"/guides/conversions"}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/introduction"}]},{"tab":"Whitepaper","pages":[{"title":"Whitepaper","href":"/whitepaper"}]}]},{"version":"v0","tag":"Deprecated","tabs":[{"tab":"Guides","groups":[{"group":"Getting started","pages":[{"title":"Introduction","href":""}]},{"group":"Setup","pages":[{"title":"API Keys Setup","description":"Learn how to create and configure API keys for authenticating with the Crown API","href":"/guides/api-keys-setup"},{"title":"Webhooks Setup","href":"/guides/webhooks-setup"}]},{"group":"Guides","pages":[{"title":"API Authentication","description":"Learn how to authenticate your API requests using JWT tokens","href":"/guides/authentication"},{"title":"Depositing BRL Funds","href":"/guides/deposits"},{"title":"Asset Conversions","href":"/guides/conversions"}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/introduction-v0"}]},{"tab":"Whitepaper","pages":[{"title":"Whitepaper","href":"/whitepaper"}]}]}]},"basePath":"","title":"Webhooks Setup - Crown API Documentation","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":[],"chunks":[]}