#shehzadnizamani_docs

1 messages ¡ Page 1 of 1 (latest)

reef lodgeBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1259833558508507136

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

graceful mural
#

You should use subscription[metadata] parameter if you want to persist the fields to the Subscription object. Otherwise they're not

autumn abyss
#

@graceful mural just to make sure I 100% understand this, let me ask a question. So if we pass custom fields using metadata they will remain attached subscription as long as subscription exists. But if we pass custom data fields using custom_fields that data will not remain attached to subscription and will be deleted over time?

graceful mural
#

Correct, custom_fields are not set on any underlying objects generated by Checkout. They only exist on the Checkout Session object

subscription_data[metadata] will be set here indefinitely until you unset it: https://docs.stripe.com/api/subscriptions/object#subscription_object-metadata

This is outlined here: https://docs.stripe.com/metadata#set-indirectly

Learn how to use metadata to save additional information.

autumn abyss
#

Thank you @graceful mural this answers my question, this thread can be closed