#danboyle8637
1 messages · Page 1 of 1 (latest)
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
Hello! You can do that in the Dashboard when viewing a specific payment.
You should see this Edit metadata button there:
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
You can modify your code to add metadata when you create Payment Intents.
Products and Prices aren't directly compatible with Payment Intents.
okay. I create Checkout Sessions. I'm sure there's a way through taht
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?
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
Payment failed? Which Event specifically? payment_intent.payment_failed?
yes
Are you using Checkout Sessions to create Subscriptions?
And then subsequent payments are failing?
both subscriptions and one time payements depending on the scenario
would this not be the event that fires if the credit card expires?
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.
okay... I'll test the invoice.payment_failed to see what I get there... thanks for the point in the right direction!
Happy to help!