#piq9117

1 messages · Page 1 of 1 (latest)

tired wingBOT
urban blade
#

Hi there

#

That's correct.

round trellis
#

aah. gotcha. thanks so much! PU_PeepoLeaveWave

urban blade
#

Sure thing!

round trellis
#

oh. got a follow up question. not sure if it's too late for this thread

urban blade
#

Sure thing

round trellis
#

if i use current_period_end.lte , will that get all subscriptions less than that date?

#

my intention is to query all subscriptions that will end between 3-28-2023 00:00 and 3-28-2023 23:59

urban blade
#

Yep so you want to set current_period_end.gte and current_period_end.lte and use Unix Timestamps for the two values that you want to query between

round trellis
#

i can have these two values in one query? or do you mean i make two separate queries?

urban blade
#

Yep you can use both parameters in the same request

round trellis
#

aah. just to clarify, i'm gonna use the nodejs example. like this?

const subscriptions = await stripe.subscriptions.list({
  current_period_end: {
    lte: <unixtime>,
    gte: <unixtime>
   }    
});
urban blade
#

Yep

round trellis
#

gotcha. thank you so much! hopefully that's it for my question. lol PU_PeepoLeaveWave