#jacques1284

1 messages · Page 1 of 1 (latest)

low sphinxBOT
deep cosmos
#

ok I found Auto-pagination in stripe

lyric lodge
#

Yes you can use Stripe (auto)pagination

deep cosmos
#

I'll use that thanks

#

Can this work?

const invoices = await this.stripe.invoices.list(data).autoPagingEach();
console.log(`Stripe invoices list successfully retrieved : ${JSON.stringify(invoices.data)}`);
return invoices.data;```
lyric lodge
#

No, follow the Syntax in the guide I shared

#
// In Node 10+:
for await (const customer of stripe.customers.list({limit: 3})) {
  // Do something with customer
}

// In other environments:
stripe.customers.list({limit: 3})
  .autoPagingEach(function(customer) {
    // Do something with customer
  });
deep cosmos
#

is it possible to retrieve all invoices in a variable or do we have to use a for ?

lyric lodge