#blackgriffen237_api

1 messages ¡ Page 1 of 1 (latest)

rich crownBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1365419365985554574

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

empty comet
#
                   :end_date => invoice.period_end,
                   :subscription_id => invoice.subscription
#

i guess my question is what are you supposed to look at for that data and why is period_start and period_end the same values

tiny oyster
#

Taking a look.

#

Ok, is your goal to obtain the start and end date of a subscription?

empty comet
#

yeah to determine how long to allow for the subscription services

#

like if they cancel or something

#

we give them 30 days grace but i guess we want to know how long they are paid up for

tiny oyster
#

Best bet is to grab that from the subscription object. This is also included in the invoice.paid event.

#

Located in lines object: data.period.start and data.period.end

#

That should get you what you need I believe.

empty comet
#

hmm

#

so what is period_start and period_end for?