#danboyle8637

1 messages · Page 1 of 1 (latest)

void bobcatBOT
#

Hello danboyle8637, 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.
dan-checkout-webhook, 23 hours ago, 13 messages

supple sphinx
#

Hello! You can do that in the Dashboard when viewing a specific payment.

#

You should see this Edit metadata button there:

jagged bobcat
#

Is there a way to do that so payments get the metadata when the intent is created?

#

Somewhere where I create the product or the price... that always gets pulled into the intent

supple sphinx
#

You can modify your code to add metadata when you create Payment Intents.

#

Products and Prices aren't directly compatible with Payment Intents.

jagged bobcat
#

okay. I create Checkout Sessions. I'm sure there's a way through taht

supple sphinx
#

No, the Checkout Session will create the Payment Intent, but not with any metadata. You can set metadata on the Checkout Session though.

#

Can you tell me more about what you're trying to accomplish?

jagged bobcat
#

yeah. I'm listening to the payment failed event in my webhook. From that I want to get the product the user has so I can notify the correct services. And I don't want to make 2 to 3 more requests if I can avoid it

supple sphinx
#

Payment failed? Which Event specifically? payment_intent.payment_failed?

jagged bobcat
#

yes

supple sphinx
#

Are you using Checkout Sessions to create Subscriptions?

#

And then subsequent payments are failing?

jagged bobcat
#

both subscriptions and one time payements depending on the scenario

#

would this not be the event that fires if the credit card expires?

supple sphinx
#

There are several Events that fire if a Subscription payment fails. This is one of them, another is invoice.payment_failed. You'd probably also get a customer.subscription.updated, but it depends on your configuration.

#

I recommend you listen for invoice.payment_failed and then look at the line items on it.

jagged bobcat
#

okay... I'll test the invoice.payment_failed to see what I get there... thanks for the point in the right direction!

supple sphinx
#

Happy to help!