#testanib

1 messages · Page 1 of 1 (latest)

zenith nacelleBOT
limpid kiln
#

Hi, are you creating the subscription by using the Create Subscription endpoint? Or are you using a checkout? I want to make sure that I have all of the information to give you an accurate response.

solar oak
#

create subscription endpoint

limpid kiln
#

Typically, metadata won't be copied over to different objects. But, there are ways you could set the metadata for the payments depending on how you're integrated

solar oak
#

is it possible to do it via the create subscription endpoint or only with a checkout?

limpid kiln
#

I know you can do this when you create a subscription via the Checkout. However, looking if you can with create subscription endpoint. Give me a few mins. please

solar oak
#

alright thanks

limpid kiln
#

I was able to confirm that this is not possible I'm afraid

solar oak
#

is there a best alternative approach to do this? I know we can listen to subscription events, aswell as the charge object references an invoice id which references the subscription, but not sure if there are any other/better ways to go about this

limpid kiln
#

The only way is as you've said to listen to the events and update the object with the metadata.

solar oak
#

update the charge object based on the subscription event data?

limpid kiln
#

Can you reword this last question please?

solar oak
#

what object are you referring to when you said "update the object with the metadata"

limpid kiln
solar oak
#

if we set the metadata in the payment intent object it will be inherited by the charge object? or just accessible to query based on information in the charge object (ex. query payment intent based on the payment intent id in the charge object)

limpid kiln
#

You can listen to invoice.payment_succeeded event and look at the charge object and update the charge object's metadata: https://stripe.com/docs/api/charges/update . I was under the impression that we were talking about Payment Intent when you said subscription charges. But I think this is what you're looking for