#Asad

1 messages · Page 1 of 1 (latest)

grand anchorBOT
wind pond
plucky jungle
#

Yeah i've tried this,but i didn't recieved any subscription object with subscribed customers.

wind pond
#

expand: ['subscriptions']

#

By default, subscriptions field is not included in the response unless it's expanded

plucky jungle
#

Like this ?
stripe.Customer.retrieve("cus_LsI5I8LDqi9rrY",expand: ['subscriptions'])

wind pond
#

It should be something like this:

stripe.Customer.retrieve("cus_xxx", {
    expand: ['subscriptions']
})
plucky jungle
#

let me try this

#

i got this "error": "Invalid API Key provided: {'expand****************s']}"

#

m using python for ths

wind pond
plucky jungle
#

let me see

#

i didn't find my request there

wind pond
#

it's likely thrown from the library itself. let me double check right way to do in python

plucky jungle
#

thanks

#

got it

#

it worked

#

stripe.Customer.retrieve("cus_*******", expand= ['subscriptions'])

#

Now my question is how can i retrieve the latest one?

#

can i change the next billing date?

wind pond
#

Stripe doesn't provide filtering logic for this, so you'd need to check created timestamp of each subscription for the latest created one

plucky jungle
#

can i change the next billing date?

wind pond
plucky jungle
#

i saw that was the date when it was billed

wind pond
#

Subscription billing is on the cycle. Could you share the use case why you'd change the billing date instead of billing cycle?

plucky jungle
#

If a user had signup with Yearly premium package and lets say after 2 days he just upgrades his membership to paid. then the next billing date should be at 1 year + 12 days (left from trial)

wind pond
#

When the user signs up for the yearly package, is the user given 14 days trial?

plucky jungle
#

yes

#

i want to extend his billing date if his trial days are still remaining

wind pond
#

If you use the trial function by Stripe, the next billing date of subscription will just be 1 year + 14 days from the intial subscription creation, i.e. extending the trials days