Created by rossmccrann 212 days ago Viewed 54 times 1 Point
Cancel or reverse a payout. A payout can be canceled only if it has not yet been paid out. A payout can be reversed only if it has already been paid out. Funds will be refunded to your available balance. See the docs for more information.
No comments yet
export async function main(stripe_con: wmill.Resource<"stripe">, payout_id: string) {
const STRIPE_REVERSE_PAYOUT_URL =
`https://api.stripe.com/v1/payouts/:${payout_id}/reverse`;
const token = stripe_con["token"];
const response = await fetch(STRIPE_REVERSE_PAYOUT_URL, {
method: "POST",
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.json();
}
No comments yet