Stripe Subscription Testing
You have many separate questions that would be better suited for Stripe's support team directly: https://support.stripe.com/contact/email
Now I will try to touch on some of the questions you had starting with the first one.
When you call session = stripe.checkout.Session.retrieve(...)
you get back a class that is a Checkout Session
. All the properties of the class map to the properties covered in the API Reference for Session. This means you can do session.id
which is cs_test_123
or session.created
which is a timestamp of the creation date. It's not really different from accessing as a dictionary overall.
You're also asking if those can change and Stripe explains their backwards compatibility policy in details in their docs here. If they were to change a name from created
to created_at
, they would do it in a new API version for new integrations and it wouldn't impact your code unless you manually changed the API version for your account so that is safe.
For the invoice.paid
event, you want to look at the invoice's billing_reason
property which would be subscription_create
for the first invoice.
You can test all of this easily in Test mode, create a session, start a subscription, etc. You can also simulate cycle changes.
I hope this helps but chatting with their support team is your best bet since those are more integration questions and not coding questions.