Edits history of script submission #22551 for ' Delete a Customer (stripe)'

  • bun
    One script reply has been approved by the moderators
    Ap­pro­ved
    import StripeClient from "stripe@11";
    
    type Stripe = {
      token: string;
    };
    export async function main(stripe_con: Stripe, customer_id: string) {
      const token = stripe_con["token"];
      const stripe = StripeClient(`${token}`, {
        httpClient: StripeClient.createFetchHttpClient(),
      });
    
      const deleted = await stripe.customers.del(`${customer_id}`);
    
      return await deleted.json();
    }
    

    Submitted by hugo989 4 days ago