Infusion Refund API Hook


(Delgesh_Shahab) #1

Can somebody help me out with sending refund action in HTTP POST.


(Tom Scott) #3

Del, it is possible to work with refunds in the Payments table via the Data Service in XML-RPC. We do not currently have a mechanism to do so in REST.


(Delgesh_Shahab) #4

Thanks @TomScott,

Can you provide me example code. How i can do this.

Thanks


(John Borelli) #5

Actually, the payment table is a read only object and you cannot add rows to it to create payments or refunds. You can use the invoice object to add a manual payment with a payment type of ‘adjustment’ and a description that describes it as a refund.


(Delgesh_Shahab) #6

Thanks, @John_Borelli I am looking for when infusion order set to refund.

Is there any way I can Get that Call? So I can Refund the order in E-commerce.


(John Borelli) #7

There is no method to directly submit refunds. As stated, using the adjustment and naming it refund is the only real way to accomplish that through the api.


(Delgesh_Shahab) #8

Can you please provide me example code not the one is listed here https://developer.infusionsoft.com/docs/xml-rpc/#data-retrieve-a-record


(John Borelli) #9

https://developer.infusionsoft.com/docs/xml-rpc/#invoice-add-a-payment-to-an-invoice


(Delgesh_Shahab) #10

i think you miss understood me.

Let me try to explain again.

When in infusion an order is refunded, then mark in E-commerce same order as refunded.

So i need to send a HTTPS Request in Infusionsoft when ever that action is triggered.

That’s what i need to know.

How can i do this in infusionsoft


(John Borelli) #11

How is the order getting refunded then? Manually in IS?


(Delgesh_Shahab) #12

Yes, order refunded happens manually in infusionsoft.


(John Borelli) #13

I’m not aware of a trigger or action set within Infusionsoft that would let you do this. The only thing that I might suggest is a nightly process that uses the api to read all order activity for the day and registers/tracks any refunds that way.


(Delgesh_Shahab) #14

Can you maybe help me out with some example code in php for all order activity for the day and registers/tracks any refunds


(Tom Scott) #15

We actually just added RestHooks for the “invoice.payment.add”, which should indicate changes that include either payment or refund actions. You would still need an intermediary system to catch the RestHook message and then post to your other system, however.


(Delgesh_Shahab) #16

Where can i find this in the doc?


(Delgesh_Shahab) #17

I found a solution, is there a API Call to get all invoiceID from contactD


(John Borelli) #19

use query on the invoice table for the ContactId and you’ll get all invoices that the contact id has assigned to it.


(Delgesh_Shahab) #20

Where can i find the example code ? https://developer.infusionsoft.com/docs/xml-rpc/#invoice


(John Borelli) #21

https://developer.infusionsoft.com/docs/xml-rpc/#data-query-a-data-table


(Delgesh_Shahab) #22

Thanks a lot for sending me on the right track, @John_Borelli and @TomScott .