#Anne

1 messages · Page 1 of 1 (latest)

delicate yachtBOT
short obsidian
smoky notch
#

Hi. My goal is to tie a checkout session object to a charge object. My theory was that I might be able to do that with metadata. But if metadata is not copied over to other objects, than I need another solution.

short obsidian
#

I see, typing how you can do this..

smoky notch
#

Ty!

short obsidian
smoky notch
#

Thank you. Will this work for a subscription?

short obsidian
#

Yes!

smoky notch
#

Let me rephrase that, can I retrieve the Payment Intent from the Checkout session using the expand feature when the checkout session object originally had checkoutSessionObject.mode.subscription

#

I will test...

short obsidian
#

I see, no it's not going to work as that is for 'payment' mode only

#

Just confirmed, it would be expand: ['invoice.charge']

smoky notch
#

I don't believe that will work for us. We are trying to save data from the Charge Api response when a subscription is purchased by the user. In particular, we need to save the billing_address, charge_id, and refund details (if there is a refund involved.) And we need to tie this to the checkout session because we save the checkout session id in our database with a user id when the checkout api responds.

short obsidian
#

You're getting the data you need from the Checkout Retrieve with expand: ['invoice.charge'] right? So when you get the event that charge is succeeded, you can retrieve this session and see this details you're looking for to save the data.