Edits history of script submission #22552 for ' List Customers (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, limit: number) {
      const token = stripe_con["token"];
      const stripe = StripeClient(`${token}`, {
        httpClient: StripeClient.createFetchHttpClient(),
      });
    
      const customers = await stripe.customers.list({
        limit: limit,
      });
    
      return await customers.json();
    }
    

    Submitted by hugo989 6 days ago