{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Manage Webhook Subscriptions","siteUrl":"https://docs.peachfinance.com","description":"API and product documentation for Peach Finance, a lending-as-a-service platform.","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":"manage-webhook-subscriptions","__idx":0},"children":["Manage Webhook Subscriptions"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This guide outlines the APIs for managing your webhook subscriptions, including retrieving, updating, and deleting subscriptions."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"retrieve-webhook-subscriptions","__idx":2},"children":["Retrieve Webhook Subscriptions"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"retrieving-all-subscriptions","__idx":3},"children":["Retrieving All Subscriptions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To get a list of all your active webhook subscriptions, call the GetWebhooks endpoint."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl --request GET \\\n  --url https://sandboxapi.peach.finance/api/webhooks \\\n  --header 'Authorization: Bearer YOUR_API_KEY'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": 0,\n  \"count\": 2,\n  \"data\": [\n    {\n      \"id\": \"whk_1234567890abcdef\",\n      \"webhookType\": \"direct\",\n      \"eventTypes\": [\"loan.created\", \"payment.succeeded\"],\n      \"webhookDirectDetails\": {\n        \"webhookUrl\": \"https://your-endpoint.com/webhook\"\n      },\n      \"enabled\": true,\n      \"createdAt\": \"2023-10-18T14:15:22Z\",\n      \"updatedAt\": \"2023-10-18T14:15:22Z\"\n    },\n    {\n      \"id\": \"whk_0987654321fedcba\",\n      \"webhookType\": \"direct\",\n      \"eventTypes\": [\"loan.statuschanged\", \"payment.failed\"],\n      \"webhookDirectDetails\": {\n        \"webhookUrl\": \"https://your-other-endpoint.com/webhook\"\n      },\n      \"enabled\": true,\n      \"createdAt\": \"2023-10-19T09:30:15Z\",\n      \"updatedAt\": \"2023-10-19T09:30:15Z\"\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"retrieve-a-specific-subscription","__idx":4},"children":["Retrieve a Specific Subscription"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To retrieve the details of a specific webhook subscription, call GetSubscriptionById and replace ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{webhookSubscriptionId}"]}," with the unique identifier of the subscription you want to retrieve."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl --request GET \\\n  --url https://sandboxapi.peach.finance/api/webhooks/whk_1234567890abcdef \\\n  --header 'Authorization: Bearer YOUR_API_KEY'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": 0,\n  \"message\": \"Webhook subscription retrieved successfully\",\n  \"data\": {\n    \"id\": \"whk_1234567890abcdef\",\n    \"webhookType\": \"direct\",\n    \"eventTypes\": [\"loan.created\", \"payment.succeeded\"],\n    \"webhookDirectDetails\": {\n      \"webhookUrl\": \"https://your-endpoint.com/webhook\"\n    },\n    \"enabled\": true,\n    \"createdAt\": \"2023-10-18T14:15:22Z\",\n    \"updatedAt\": \"2023-10-18T14:15:22Z\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"update-a-webhook-subscription","__idx":5},"children":["Update a Webhook Subscription"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To update an existing webhook subscription, call UpdateWebhookSubscription and replace ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{webhookSubscriptionId}"]}," with the unique identifier of the subscription you want to update. The following request adds the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["loan.statuschanged"]}," event subscription."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl --request PUT \\\n  --url https://sandboxapi.peach.finance/api/webhooks/whk_1234567890abcdef \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n    \"eventTypes\": [\"loan.created\", \"loan.statuschanged\", \"payment.succeeded\"],\n    \"webhookDirectDetails\": {\n      \"webhookUrl\": \"https://your-new-endpoint.com/webhook\"\n    },\n    \"enabled\": true\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": 0,\n  \"message\": \"Webhook subscription updated successfully\",\n  \"data\": {\n    \"id\": \"whk_1234567890abcdef\",\n    \"webhookType\": \"direct\",\n    \"eventTypes\": [\"loan.created\", \"loan.statuschanged\", \"payment.succeeded\"],\n    \"webhookDirectDetails\": {\n      \"webhookUrl\": \"https://your-new-endpoint.com/webhook\"\n    },\n    \"enabled\": true,\n    \"createdAt\": \"2023-10-18T14:15:22Z\",\n    \"updatedAt\": \"2023-10-20T11:45:30Z\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"delete-a-webhook-subscription","__idx":6},"children":["Delete a Webhook Subscription"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To remove a webhook subscription, call DeleteWebhookSubscription and replace ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{webhookSubscriptionId}"]}," with the unique identifier of the subscription you want to delete."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl --request DELETE \\\n  --url https://sandboxapi.peach.finance/api/webhooks/whk_1234567890abcdef \\\n  --header 'Authorization: Bearer YOUR_API_KEY'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": 0,\n  \"message\": \"Webhook subscription deleted successfully\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"see-also","__idx":7},"children":["See also"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-tools/webhooks/about-webhooks"},"children":["About Webhooks"]}]}," — How webhooks work in Peach, including signing and delivery."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-tools/webhooks/webhook-events"},"children":["Webhook Events"]}]}," — Reference for the event types you can subscribe to."]}]}]},"headings":[{"value":"Manage Webhook Subscriptions","id":"manage-webhook-subscriptions","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Retrieve Webhook Subscriptions","id":"retrieve-webhook-subscriptions","depth":2},{"value":"Retrieving All Subscriptions","id":"retrieving-all-subscriptions","depth":3},{"value":"Retrieve a Specific Subscription","id":"retrieve-a-specific-subscription","depth":3},{"value":"Update a Webhook Subscription","id":"update-a-webhook-subscription","depth":2},{"value":"Delete a Webhook Subscription","id":"delete-a-webhook-subscription","depth":2},{"value":"See also","id":"see-also","depth":2}],"frontmatter":{"seo":{"title":"Manage Webhook Subscriptions"}},"lastModified":"2026-05-01T14:33:55.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/developer-tools/webhooks/manage-subscriptions","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}