Subscription management and recurring billing solutions
SubscriptionBridge
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer_guide:developer_guide:webhooks [2013/05/07 10:33]
matt [WebHook POST Fields]
developer_guide:developer_guide:webhooks [2013/05/07 07:33] (current)
Line 1: Line 1:
-====== WebHooks ====== +====== WebHooks ======  
- +  
-===== What is a Webhook? ===== +===== What is a Webhook? =====  
- +  
-Taken directly from the official WebHook website:  +Taken directly from the official WebHook website:   
- +  
-"The concept of a WebHook is simple. A WebHook is an HTTP callback: an HTTP POST that occurs when something happens; a simple event-notification via HTTP POST." +"The concept of a WebHook is simple. A WebHook is an HTTP callback: an HTTP POST that occurs when something happens; a simple event-notification via HTTP POST."  
- +  
-In other words, a WebHook is a method by which your application can react to events that occur during the Subscription Life cycle (e.g. a new subscription, a recurring payment is declined, a subscription is upgraded, etc.).  For example, your blog or iPhone app can use WebHooks to grant customers access to special content, and restrict access to others. +In other words, a WebHook is a method by which your application can react to events that occur during the Subscription Life cycle (e.g. a new subscription, a recurring payment is declined, a subscription is upgraded, etc.).  For example, your blog or iPhone app can use WebHooks to grant customers access to special content, and restrict access to others.  
- +  
-For more information, you can read more at the [[http://wiki.webhooks.org/w/page/13385124/FrontPage|official webhook site]]. +For more information, you can read more at the [[http://wiki.webhooks.org/w/page/13385124/FrontPage|official webhook site]].  
- +  
-===== How it works ===== +===== How it works =====  
-A WebHook URL is saved in your Merchant Settings.  The URL points to a script in your app.  We send a form POST message to your script when there is an event (e.g. a sign-up). Your script uses the information in the POST to trigger an action (e.g. enable content to a new user).  +A WebHook URL is saved in your Merchant Settings.  The URL points to a script in your app.  We send a form POST message to your script when there is an event (e.g. a sign-up). Your script uses the information in the POST to trigger an action (e.g. enable content to a new user).   
- +  
-A [[merchant_guide:notifications_list_callbackurl|full list of events]] and sample scripts are available. +A [[merchant_guide:notifications_list_callbackurl|full list of events]] and sample scripts are available.  
- +  
-===== WebHook URL ===== +===== WebHook URL =====  
- +  
-The WebHook URL, which is set in the [[merchant_guide:notifications|Notification Settings]] area of the Merchant Center (separately for each //store//), defines the location of script on your Web site or App that contains code designed by you to interpret and react to the information provided by SubscriptionBridge in the //post-back message//. +The WebHook URL, which is set in the [[merchant_guide:notifications|Notification Settings]] area of the Merchant Center (separately for each //store//), defines the location of script on your Web site or App that contains code designed by you to interpret and react to the information provided by SubscriptionBridge in the //post-back message//.  
- +  
-Here the steps required to configure your Webhook URL: +Here the steps required to configure your Webhook URL:  
-  - Log into the [[https://www.subscriptionbridge.com/merchantcenter/login.asp|Merchant Center]]. +  - Log into the [[https://www.subscriptionbridge.com/merchantcenter/login.asp|Merchant Center]].  
-  - Navigate to "Notification Settings" +  - Navigate to "Notification Settings"  
-  - Under "Advanced Settings" find "Post-back / Webhook URL" +  - Under "Advanced Settings" find "Post-back / Webhook URL"  
-  - Type your URL into the box. We recommend using a secure URL. +  - Type your URL into the box. We recommend using a secure URL.  
-  - Click "Save Notification Settings" at the bottom of the page. +  - Click "Save Notification Settings" at the bottom of the page.  
- +  
-===== Webhook Script ===== +===== Webhook Script =====  
- +  
-Unlike Post-backs, a Webhook POST can be received without any complex parsing. +Unlike Post-backs, a Webhook POST can be received without any complex parsing.  
- +  
-Since the Webhook is a form POST you can retrieve the values the same way you would with any other form on your web site. +Since the Webhook is a form POST you can retrieve the values the same way you would with any other form on your web site.  
- +  
-===== WebHook POST Fields ===== +===== WebHook POST Fields =====  
- +  
-^ Name ^ Example ^  +^ Name ^ Example ^   
-| Amount | 44.98 |  +| Amount | 44.98 |   
-| BillAddress | 55 Main St. |  +| BillAddress | 55 Main St. |   
-| BillAddress2 | Suite 500 |  +| BillAddress2 | Suite 500 |   
-| BillCity | Cityville |  +| BillCity | Cityville |   
-| BillCompany | Widget, Inc. |  +| BillCompany | Widget, Inc. |   
-| BillCountry | US |  +| BillCountry | US |   
-| BillFirstName | Jane |  +| BillFirstName | Jane |   
-| BillLastName | Doe |  +| BillLastName | Doe |   
-| BillPhone | 555-555-5555 |  +| BillPhone | 555-555-5555 |   
-| BillState | CA |  +| BillState | CA |   
-| BillZip | 55555 |  +| BillZip | 55555 |   
-| CustomerID | 0123456789 |  +| CustomerID | 0123456789 |   
-| DtCreated | 3/7/2013 6:04 AM |  +| DtCreated | 3/7/2013 6:04 AM |   
-| Email | no-reply@subscriptionbridge.com |  +| Email | no-reply@subscriptionbridge.com |   
-| EndDate | 1/1/1900 12:00 AM |  +| EndDate | 1/1/1900 12:00 AM |   
-| EndDateTrial | 4/7/2013 6:04 AM |  +| EndDateTrial | 4/7/2013 6:04 AM |   
-| EventCode | sb_n_4a |  +| EventCode | sb_n_4a |   
-| FirstName | Jane |  +| FirstName | Jane |   
-| Guid | ABC123456789 |  +| Guid | ABC123456789 |   
-| LastName | Doe |  +| LastName | Doe |   
-| NextBillingAmount | 39 |  +| NextBillingAmount | 39 |   
-| NextBillingDate | 6/7/2013 6:04 AM | +| NextBillingDate | 6/7/2013 6:04 AM |  
-| PackageName | Widget 123 - Monthly | +| PackageName | Widget 123 - Monthly |  
-| PlanName | Monthly | +| PlanName | Monthly |  
-| ProductName | Widget 123 | +| ProductName | Widget 123 |  
-| ShipAddress | 55 Main St. |  +| ShipAddress | 55 Main St. |   
-| ShipAddress2 | Suite 500 |  +| ShipAddress2 | Suite 500 |   
-| ShipCity | Cityville |  +| ShipCity | Cityville |   
-| ShipCompany | Widget, Inc. |  +| ShipCompany | Widget, Inc. |   
-| ShipCountry | US |  +| ShipCountry | US |   
-| ShipFirstName | Jane |  +| ShipFirstName | Jane |   
-| ShipLastName | Doe |  +| ShipLastName | Doe |   
-| ShipPhone | 555-555-5555 |  +| ShipPhone | 555-555-5555 |   
-| ShipState | CA |  +| ShipState | CA |   
-| ShipZip | 55555 |  +| ShipZip | 55555 |   
-| SID | my custom field | +| SID | my custom field |  
-| StartDate | 3/7/2013 6:04 AM | +| StartDate | 3/7/2013 6:04 AM |  
-| Status | Active | +| Status | Active |  
-| StoreActive | True | +| StoreActive | True |  
-| StoreAddress | 123 South St. | +| StoreAddress | 123 South St. |  
-| StoreEmail | no-reply@subscriptionbridge.com | +| StoreEmail | no-reply@subscriptionbridge.com |  
-| StoreID | 1234 | +| StoreID | 1234 |  
-| StoreKey | subdomain | +| StoreKey | subdomain |  
-| StoreLocale | en-US | +| StoreLocale | en-US |  
-| StoreTimeZone | -5 | +| StoreTimeZone | -5 |  
-| TaxAmount | 0 | +| TaxAmount | 0 |  
-| TransactionAmount | 39.00 | +| TransactionAmount | 39.00 |  
-| TransactionCurrency | USD | +| TransactionCurrency | USD |  
-| TransactionDtCreated | 5/7/2013 7:30:03 AM | +| TransactionDtCreated | 5/7/2013 7:30:03 AM |  
-| TransactionID | ABC1234 | +| TransactionID | ABC1234 |  
-| TransactionMessageCode | 100 | +| TransactionMessageCode | 100 |  
-| TransactionMessageText | SUCCESS | +| TransactionMessageText | SUCCESS |  
-| TransactionRefID | ABC0123456789 | +| TransactionRefID | ABC0123456789 |  
-| TransactionResultCode | 100 | +| TransactionResultCode | 100 |  
-| TransactionType | recurring_payment | +| TransactionType | recurring_payment |  
- +  
- +  
-===== Testing WebHooks ===== +===== Testing WebHooks =====  
 +
 We recommend that you use a site, such as [[http://postcatcher.in/|PostCatcher]], to collect the WebHooks. We recommend that you use a site, such as [[http://postcatcher.in/|PostCatcher]], to collect the WebHooks.
C:/Domains/subscrip/wiki.subscriptionbridge.com/wwwroot/sbdata10/attic/developer_guide/developer_guide/webhooks.1367937185.txt.gz · Last modified: 2013/05/07 07:33 (external edit)
 


Contact us for more information, or head over to the free trial sign-up form to give SubscriptionBridge a try!   Sign Up Free