{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Callbacks","description":"Public TRP API for VASP-to-VASP Travel Rule data exchange.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"callbacks"},"children":["Callbacks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["TRP delivers asynchronous updates to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]}," URL via signed ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," ","requests. Each callback is queued and retried with exponential backoff."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"retry-schedule"},"children":["Retry schedule"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The KYCAID TRP backend retries failed callbacks at:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"1m → 5m → 15m → 30m → 1h → 3h → 6h → 12h → 24h\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After 9 unsuccessful attempts the callback is marked ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FAILED"]}," and"," ","dropped."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"signature-verification"},"children":["Signature verification"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every callback ships an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-data-integrity"]}," header computed as:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"HMAC-SHA512( BASE64( request_body ), customer_signing_secret )\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pseudocode:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"js","header":{"controls":{"copy":{}}},"source":"import crypto from 'node:crypto';\n\nfunction verify(rawBody, signatureHeader, secret) {\n    const base64 = Buffer.from(rawBody, 'utf8').toString('base64');\n    const expected = crypto\n        .createHmac('sha512', secret)\n        .update(base64)\n        .digest('hex');\n    return crypto.timingSafeEqual(\n        Buffer.from(expected),\n        Buffer.from(signatureHeader),\n    );\n}\n","lang":"js"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"callback-types"},"children":["Callback types"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"When"},"children":["When"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Body"},"children":["Body"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INQUIRY"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sent by originator VASP to beneficiary VASP after ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transfers/initiate"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ asset, amount, callback, IVMS101 }"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INQUIRY_RESOLUTION"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sent by beneficiary VASP back to originator."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ approved, callback }"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TRANSFER_RESOLUTION"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sent to the originator's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]}," once the beneficiary VASP approves."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ transferId, status, statusComment, callback }"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TRANSFER_CONFIRMATION"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sent to the beneficiary's stored callback once ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["txId"]}," is broadcast."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ txid }"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Respond with ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["2xx"]}," to acknowledge. Any non-2xx response is retried per"," ","the schedule above."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"openapi-webhook-references"},"children":["OpenAPI webhook references"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Schemas for each callback body are defined as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webhooks"]}," in the OpenAPI"," ","document — see the API Reference: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webhookInquiry"]},","," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webhookInquiryResolution"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webhookTransferResolution"]},","," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webhookTransferConfirmation"]},"."]}]},"headings":[{"value":"Callbacks","id":"callbacks","depth":1},{"value":"Retry schedule","id":"retry-schedule","depth":2},{"value":"Signature verification","id":"signature-verification","depth":2},{"value":"Callback types","id":"callback-types","depth":2},{"value":"OpenAPI webhook references","id":"openapi-webhook-references","depth":2}],"frontmatter":{"title":"Callbacks","seo":{"title":"Callbacks"}},"lastModified":"2026-05-11T08:02:14.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/pages/callbacks","userData":{"isAuthenticated":false,"teams":["anonymous"]}}