#shax

1 messages ยท Page 1 of 1 (latest)

shy flintBOT
wet cloak
#

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

cloud folio
#

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?

wet cloak
#

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

cloud folio
#

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

wet cloak
#

Do you create Price via Dashboard or via API?

cloud folio
#

via dashboard

wet cloak
#

You are using webhook, would you be able to create the Price programmatically instead?

cloud folio
#

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

wet cloak
#

Yes metadata is what I am about to suggest

cloud folio
#

metadata: {
sessionType: "subscription",
buyerID,
subscriptionType,
},

#

we were setting meta data like this when creating sessions

wet cloak
#

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

cloud folio
#

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

wet cloak
#

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

cloud folio
#

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

wet cloak
#

That you would want to save in the Price object.

#

Then on checkout.session.completed you can expand the Price object's metadata

cloud folio
#

ok let me try this , Thank you

wet cloak
#

I am stepping down for the day. If you have further question feel free to ask in the channel ๐Ÿ˜„

cloud folio
#

sure, thank you very much for your help

#

have great rest of the day