#shax
1 messages ยท Page 1 of 1 (latest)
Hey there! Pricing table is just a portal before Checkout Session. When your customer click on a plan inside the table, it will start redirecting to a Checkout page just like normal Session
So you should have received checkout.session.completed webhook event as you were integrating with Checkout
yes receiving that, but the payload does not contain any information about the subscription type like pro, premium
it contain price but it is subject to change from stripe in future, in that case again this login wont work for us
you want me to share object recived in webhook?
I would recommend tight the information of pro/premium in the Price object
so from the price id you can expand the Price object to see
yes that what i need, can you please provide relevant link,
i am unable to figure it out from documentation
thanking you for all your help
Do you create Price via Dashboard or via API?
via dashboard
You are using webhook, would you be able to create the Price programmatically instead?
no actually, current requirements are to manage prices from dashboard only
previously we were setting it programmatically, and we were able to append necessary information in metadata , that we were getting back in webhook call
Yes metadata is what I am about to suggest
metadata: {
sessionType: "subscription",
buyerID,
subscriptionType,
},
we were setting meta data like this when creating sessions
Can't you just move back to create Price and metadata programmatically? Then creating a Price table you can still specify that created Price Id
on Dashboard
not sure where i will append meta data, as we are passing dynamic data, like buyerID, subscription type
this is the main blocker actually
let me send payload to your inbox if you don't mind
not sure where i will append meta data, as we are passing dynamic data, like buyerID, subscription type
For the Price you only need to log it was "Pro" or "Premium", right? set it here https://stripe.com/docs/api/prices/create#create_price-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Do you mean you want to set dynamic metadata on the Checkout Session generated from Pricing table?
This mentioned client-reference-id which is an unique id. You can then have a map from client-reference-id to (buyerID,type) in your own system and query it as a key
sure let me try this,
thank you very much
again we wont be getting subscription information
since at the time the user click we dont know wheich type he is going to select, like pro, premium, monthly yearly etc
That you would want to save in the Price object.
For the Price you only need to log it was "Pro" or "Premium", right? set it here https://stripe.com/docs/api/prices/create#create_price-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Then on checkout.session.completed you can expand the Price object's metadata
ok let me try this , Thank you
I am stepping down for the day. If you have further question feel free to ask in the channel ๐