type Stripe = {
token: string;
};
/**
* Delete webhook endpoints webhook endpoint
* You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.
*/
export async function main(auth: Stripe, webhook_endpoint: string) {
const url = new URL(
`https://api.stripe.com/v1/webhook_endpoints/${webhook_endpoint}`
);
const response = await fetch(url, {
method: "DELETE",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Authorization: "Bearer " + auth.token,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 368 days ago
type Stripe = {
token: string;
};
/**
* Delete webhook endpoints webhook endpoint
* You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.
*/
export async function main(auth: Stripe, webhook_endpoint: string) {
const url = new URL(
`https://api.stripe.com/v1/webhook_endpoints/${webhook_endpoint}`
);
const response = await fetch(url, {
method: "DELETE",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Authorization: "Bearer " + auth.token,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 795 days ago
type Stripe = {
token: string;
};
/**
* Delete webhook endpoints webhook endpoint
* <p>You can also delete webhook endpoints via the <a href="https://dashboard.stripe.com/account/webhooks">webhook endpoint management</a> page of the Stripe dashboard.</p>
*/
export async function main(auth: Stripe, webhook_endpoint: string) {
const url = new URL(
`https://api.stripe.com/v1/webhook_endpoints/${webhook_endpoint}`
);
const response = await fetch(url, {
method: "DELETE",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Authorization: "Bearer " + auth.token,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 922 days ago