#.jovanm_

1 messages ยท Page 1 of 1 (latest)

gray spokeBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

short umbra
#

Hi ๐Ÿ‘‹ that isn't possible. If you add metadata at your step 2, you're putting the metadata on the Subscription object being created. Most of the time metadata isn't copied from one object to related objects, so you won't see the Subscriptions metadata on those Event types because they contain the related Payment Intent instead.

graceful gull
#

Is it possible to update payment intent after confirmPayment? just to add metadata on it?

#

Like this ?

#

Will the update be included in the webhook?

short umbra
#

It is possible to update the Payment Intent after confirmation, but the details won't be in the payment_intent.succeeded Event sent to your endpoint since those details weren't present when the payment was triggered (confirmation request).

graceful gull
#

Hmmm so it is really not possible. Is there any other way to get the metadata on payment_intent.succeeded webhook?
I am using subscriptions and invoice here.

short umbra
#

Do you need to listen to payment_intent.succeeded specifially? There are also invoice.paid, invoice.payment_succeeded, and invoice.payment_failed which get triggered when an Invoice processes a payment. Those will include Invoice objects in them rather than Payment Intents, which do have a field that references a snapshot of the Subscription's metadata (if the Invoice was created recently enough)
https://stripe.com/docs/api/invoices/object#invoice_object-subscription_details-metadata

gray spokeBOT
graceful gull
#

Currently, I am using payment_intent.succeeded to create new customers after their payment has been successful.

Is there any other webhooks that will tell me that their payment in their subscription or one-time payment has been successful?

#

Just to give you an idea about our products:
We have Monthly Subscription, and One-time Payment.

#

Currently, in order for me to create new customers (in our own DB) after successful payment, I am using payment_intent.succeeded

real abyss
#

Hello! I'm taking over and catching up...

#

In Step 2 from your original message, you should be able to update the Payment Intent (not the Subscription) with the metadata you want before passing the client secret to the client.

#

The metdata on the Payment Intent will then show up in payment_intent.succeeded.

#

Because you're adding it before that Event fires.

graceful gull
#

Ohhh, where I can see the payment intent Id in Step 2?

real abyss
#

Where is the client secret you mentioned coming from?

#

In your original message you said "Step 2 - Create subscription (generates client secret)"

#

Where are you getting that client secret?

graceful gull
#

Ahhh gotcha

#

Thanks for your help here!

#

Whew!

real abyss
#

Yep, so you can make an additional call to update that Payment Intent with metadata at that point.