#jason_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ 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/1329905387666673725
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi hi! That sounds frustrating - let me take a peek!
Where do you store the metadata? Can you share a Request ID that includes you storing the metadata for the subscription related to that event?
Thanks for the quick response! The metadata is stored on the stripe user when we create their account.
Let me see if I can find the historical data for this user. Standby
I see "user created" in the console but no API data associated with it, should I look somehwere else?
Can you share a link to that please?
Looking here it appears the data is truncated because it's older than 30 days. Not sure if you have viz into that
I'm also looking at customers who recently signed up with this promotion and the data is present.
Cool, thanks. I can't find any requests on that Customer where you added Metadata; maybe I'm missing something?
Ok, that's interesting. So you're saying the event for that user did not have the metadata?
The object itself. Events show the full object, including that object's metadata, but they don't have their own metadata
This is super helpful, thank you.
It's possible there's a bug with our code somewhere. Will review everything again
I'm saying I can't see the Request where the Customer was created, so I don't really have enough info to say much of value at this point.
For that original subscription ID that you provided (sub_1QWlUrAKTR8DgLwrxvhDVfdU), I noticed something potentially relevant. That subscription was created by a Checkout Session, I see that you put metadata on the Checkout Session itself but that isn't automatically copied on to the subscription
https://dashboard.stripe.com/logs/req_4UKFBJt3DvmDs1
If you want that metadata to be copied to the subscription, you can set it via the subscription_data.metadata param when creating the Checkout Session.
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-subscription_data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ok interesting find! Dumb question, we're setting the metadata like this on user create:
customer = stripe.Customer.create(
name=user_account.username,
metadata={"user_id": user_account.uuid},
)
Are you saying this would be stored on the subscription or checkout session?
It all depends on where you expect that to be. That is the right way to specify the UUID to be set on the customer itself, it just wouldn't show up on the Customer's subscriptions automatically unless you set it there too.