26 Apr 2024 
Support Center » Knowledgebase » Technical FAQs » Advanced integration and API » Outgoing API: Event notification when a refund has been made
 Outgoing API: Event notification when a refund has been made
Solution

We don't support a "refund" event in the outbound API. This is because our API doesn't report on individual transactions after the initial sale is made. It only reports on the entire subscriber record.

However, when a refund is made within the system, you can also "Refund and unsubscribe". If you click that option then a "suspend" notification is sent. But it is sent because they are unsubscribed and not because the refund was made specifically. So if you choose the option to "Refund and do not unsubscribe", then a "suspend" notification is not sent. 

Our incoming and outgoing API notifications revolve around a client, not a particular transaction. So if a particular transaction is refunded, the API is only triggered if you have chosen the button to "refund and unsubscribe". In this case the API is triggered because you are unsubscribing the client. But we don't have an API call that specifically addresses all refunds.

In the case of one time payments, the same applies. Even though it is a one time payment, it is still possible to "unsubscribe" the person. 

So in practice, as long as you click to "refund and unsubscribe", then an API notification will be sent-- it would be "suspend". 

We’ve added this to functionality to the outgoing API:

u_last_unsubscribe_reason blank|billing_failed|incoming_api_unsubscribe|refund_and_unsubscribe|client_cancelled|admin_unsubscribed

This indicates the reason why the mode=suspend. This field will be blank until the client is first unsubscribed for some reason (mode=suspend). The field will then be set to one of the above values, and will be populated for the remaining life of the client. For example, if the client has a billing failure, the API call will be mode=suspend and this field will be 'billing_failed'. If they reactivate later and an API call is sent with mode=reactivate, the value will still be set to 'billing_failed'. Then later let's say they ask for a refund. Another API call would be sent at that time with mode=suspend and this field would then be 'refund_and_unsubscribe'.
Note that you can safely ignore this field for all intents and purposes when the mode is something other than 'suspend'.

NOTE: Our outbound API is triggered on subscriber events. A refund is a transaction event, rather than a subscriber event. Our Advanced Transaction API includes refund events. The Advanced Transaction API works very much like the outbound API, but it is set up in your account profile and preferences and is triggered on all transactions, rather than being set up per offer like the outbound API.

To set it up, click the main menu under My Account >> Profile & Preferences. In the Advanced Transaction API section, you provide a URL on your site. This should be the location where you would set up a script to capture the API calls.

You can find documentation on the Advanced Transaction API modes and descriptions here: 

http://support.nanacast.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=239

Keywords: Outgoing API



Article Details
Article ID: 157
Created On: 02 Apr 2010 12:45 PM

 This answer was helpful  This answer was not helpful

 Back
 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | News
Language:

Help Desk Software By Kayako eSupport v3.60.04