import { whopSdk } from "@/lib/whop-sdk";
const result = await whopSdk.webhooks.testWebhook({
// The event to test the webhook for.
event:
"app_membership_cancel_at_period_end_changed" /* Valid values: app_membership_cancel_at_period_end_changed | app_membership_went_invalid | app_membership_went_valid | app_payment_failed | app_payment_pending | app_payment_succeeded | dispute_alert_created | dispute_created | dispute_updated | membership_cancel_at_period_end_changed | membership_experience_claimed | membership_metadata_updated | membership_went_invalid | membership_went_valid | payment_affiliate_reward_created | payment_failed | payment_pending | payment_succeeded | refund_created | refund_updated | resolution_created | resolution_decided | resolution_updated */ /* Required! */,
// The ID of the webhook to test.
id: "xxxxxxxxxxx" /* Required! */,
});
const response = {
// The body of the webhook response
body: { any: "json" },
// The HTTP response code of this request
status: 10,
// Whether or not the webhook test was successful
success: true,
};
Was this page helpful?