type Stripe = {
token: string;
};
/**
* Delete accounts account
* With Connect, you can delete accounts you manage.
Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
If you want to delete your own account, use the account information tab in your account settings instead.
*/
export async function main(auth: Stripe, account: string) {
const url = new URL(`https://api.stripe.com/v1/accounts/${account}`);
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 accounts account
* With Connect, you can delete accounts you manage.
Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
If you want to delete your own account, use the account information tab in your account settings instead.
*/
export async function main(auth: Stripe, account: string) {
const url = new URL(`https://api.stripe.com/v1/accounts/${account}`);
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 accounts account
* <p>With <a href="/docs/connect">Connect</a>, you can delete accounts you manage.
*/
export async function main(auth: Stripe, account: string) {
const url = new URL(`https://api.stripe.com/v1/accounts/${account}`);
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