#gumptiontechnologies
1 messages · Page 1 of 1 (latest)
Hi Jack,
Can you help in this regard please?
Hi there, you can get the payment_intent ID (https://stripe.com/docs/api/invoices/object#invoice_object-payment_intent) from the invoice object, and pass it to the Refunds API (https://stripe.com/docs/api/refunds/create#create_refund) to create an refund.
Does every invoice have "payment_intent" ID?
Yes, except for $0 invoice which payment is not required.
Alright. Thank a lot my friend.
I am checking it
Can you check this for me please?
I tried a refund with Invoice Intent and it didn't work for me... what is wrong here?
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
it's a PaymentIntent ID so you should use payment_intent param (https://stripe.com/docs/api/refunds/create#create_refund-payment_intent)
We tried this too ... but it gives the same error
$invoiceData = $stripeClientObject->refunds->create(['payment_intent' => $stripeinvoiceid],[],$stripeConnectAccountArray);
Can you share with me the request ID?
Based on the code that you sent, it seems like you are passing the invoice ID instead of the paymentIntent ID.
We put a wrong variable name but it has intent id
The request ID please?
$invoiceData = $stripeClientObject->refunds->create(['payment_intent' => "pi_3MODbwRmYo0rJsED0WeYKkV9"],[],$stripeConnectAccountArray);
I need the request ID (req_xxx), Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Alternatively, you can also share with me the request_log_url that's returned in the API response.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
req_gRPIVealyiSbJK
OK. This paymentIntent was created in your connected account. So you need to specify the stripe_account in the $stripeConnectAccountArray when making an API request for connected account.
You can refer to this doc to learn more about making API request for connected account (https://stripe.com/docs/connect/authentication)