Edits history of script submission #22553 for ' List Invoices (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 invoices = await stripe.invoices.list({
        limit: limit,
      });
    
      return await invoices.json();
    }
    

    Submitted by hugo989 7 days ago