Refund subscription payments from Invoice ID

Hi,

I’ve been trying for 4 hours to find a way but couldn’t figure it out.

I need to refund certain subscription payments but I do not find the payment ID. I only have the invoice ID and customer ID. ( * inv:0-ChDJ3EyMicUmyKZRoisnIEFVEMAM )

How can I find I refund a payment done through invoice if I don’t have the payment ID? Or how can I find the payment ID from an invoice ID to process a refund?

thank you :slight_smile:

The way to get the payment_id for an invoice is to call GetInvoice with the invoice_id. In the response will be the order_id. You’ll then take the order_id and call RetrieveOrder. In that response will be the payment_id or tender_id. That’s the ID you pass in as the payment_id in the refund request.

For this invoice the payment_id is 18HzAQ7UmqRS1nOpQ5x4Kdx8UqdZY. :slightly_smiling_face: