#Ayush9200

1 messages · Page 1 of 1 (latest)

vapid stagBOT
timber sierra
#

Hi there

#

The easiest way to do this is to set metadata on the PaymentIntent and then use Webhooks for payment_intent.succeeded and update your database based on that Webhook

twin bridge
#

Ok great. I will take this approach

timber sierra
#

👍

twin bridge
#

Can you tell how will I update on stripe?

timber sierra
#

Not sure what you mean by that?

twin bridge
#

Is there any way to update it, once I recieved my success payment intent webhook response

#

I just want to update on Stripe that this customer purchased this product with this coupon ID

#

So that we can see on dashboard

timber sierra
#

What is "it"?

#

Yes you can update metadata on the PaymentIntent whenver you want

#

Is that what you mean?

twin bridge
#

No, sorry. I get that part we can include metadata in payment intent and then pay and confirm from webhook. But I want to update on stripe as well this coupon has been used by a customer for this product.

timber sierra
#

Hmm no other than metadata there isn't really a way to do that.

#

You should really be using your own database here and use that to keep track of your inventory and this product info

twin bridge
#

I am talking about this part

#

If somebody have used promotional code then I just want to update it here.

timber sierra
#

Yeah but that doesn't apply there because you can't use promo codes with PaymentIntents

twin bridge
#

OH ok got it.

#

Is there any other way for one time payments, where we can include these things?

timber sierra
#

Yep you could use Invoices

twin bridge
#

I dont want to create invoice or payment link

timber sierra
#

Ah then no

twin bridge
#

ok

#

Thank you very much