#TonezeraBR - passing metadata

1 messages · Page 1 of 1 (latest)

prime baneBOT
mighty wasp
simple furnace
#

that's it

#

?

mighty wasp
#

That's an event but I can start there

#

TonezeraBR - passing metadata

#

Okay so this is for a charge succeeding. When did you try to attach the metadata?

#

Since this happened because of a Checkout page, I will assume you added the metadata to a Checkout Session, correct?

simple furnace
#

yes

simple furnace
mighty wasp
simple furnace
#

Yes, in my response no have a metadata

#

why?

mighty wasp
#

Because metadata from the Subscription will not pass down the Charge

#

The metadata is there on the Subscription

simple furnace
#

has an alternative, to pass and return data

mighty wasp
#

But it does not get passed to the Invoice, Payment Intent, or Charge object

#

has an alternative, to pass and return data

What does that mean?

simple furnace
#

I'm trying to pass data that will be saved, and I'll return later when I have a successful payment

#

Is there an alternative other than metadata?

mighty wasp
#

The data is saved on the Subscription. You can access it but you will need to make an additional API call

#

The Charge object that is returned in that event has an invoice property with the Invoice ID (in_XXXXx)

#

You can get the User ID you set in the Checkout Session by making an API call to retrieve the Invoice and expanding the subscription property on the Invoice object

simple furnace
#

Ok, thank you

mighty wasp
#

You can write this into your code for handling the charge,succeeded event

simple furnace
#

I believe that with this I can already do what I thought, thank you