#nash-refunds
1 messages · Page 1 of 1 (latest)
Hi @vocal axle
We basically create a customer and an intent and confirmCardPayment on the intent.
On the backend we charge the customer every month.
So we associate the customer with the intent.
In some cases, customer wants a refund, after first charge or maybe after several charges.
yeah, you need the PaymentIntent or Charge id to refund, there's no way around it
I see. With charge id, you're referring to old charges api?
even if you use PaymentIntents now, there is a charge id generated upon successful payment
ah ok.
Ahh, I see. stripe payment_intents list --limit 1 | jq '.data[].charges.data[].id'
So when I confirm an intent to retrieve it, I can save the charge id.
So whenever we charge a customer with an intent, we can save the charge id with our internal charge.
Another question, why does an intent have a list of charges? You can make multiple succesfull charges on one intent?
i don't have the context on this, but the documentation does mention This list only contains the latest charge, even if there were previously multiple unsuccessful charges.
ah ok.
Last question for tonight :). I was trying to see if I can get all charges for a customer if I have the customer id. Is that possible?
This is even if a charge was made through an intent?
yep