API Docs
Addons and Discounts are objects that allow the merchant to make 1 time or recurring additions or credits to a customer’s subscription. These objects servers as a template for adding addons and discoutns to a subscription. Once an addon or discount has been applied to a subscription it’s represented by a SubscriptionAddOn or SubscriptionDiscount which is very similar but with some additional status fields.
The only programtical difference between an Addon and a Discount is the object’s name and how it affects the subscription. They have all of same fields that are defined below.
Property | Description | Data Type |
Identifier | The merchants reference value for this object. | String |
Name | Name of the Addon. | String |
Description |
Description for the Addon. | String |
Amount | The amount to be added to the total billing amount. | decimal |
NumberOfBillingCycles | The number of cycles to process this addition. Used in conjunction with NeverExpires. | int |
NeverExpires | Indicates if this Add-on has an end. Used in conjunction with NumberOfBillingCycles. | bool |
ModifiedBy | The last person to make a change to this item. | String |
Active | Indicates if it’s valid to create new instances of this addon. | bool |
UpdatedTime | When this item was last changed. | DateTime? |
CreatedTime | When this item was created. | DateTime? |
Below are the methods that deal directly with Addons. There are similar methods for Discount. These definitions are for the SOAP interface. The only difference in the REST interface is putting the sessionToken in the HTTP Authorization Header instead of as a parameter.
IdResponse CreateAddon (string sessionToken, Addon addon, string merchantProfileId)
Parameter | Data Type | Description |
sessionToken | string | |
addon | Addon | |
merchantProfileId | string |
Data Type | Description |
IdResponse | IdResponse |
When updating an Addon you only need to submit data that you are changing. The booleans should be used to indicate if the corresponding non-nullable value was set by the user.
Response UpdateAddon (string sessionToken, Addon newData, string currentIdentifier, string merchantProfileId, bool? activeSpecified = null, bool? expiresSpecified = null, bool? numCyclesSpecified = null)
Parameter | Data Type | Description |
sessionToken | string | |
newData | Addon | |
currentIdentifier | string | |
merchantProfileId | string | |
activeSpecified | bool? | |
expiresSpecified | bool? | |
numCyclesSpecified | bool? |
Data Type | Description |
Response | Response |
GetAddonResponse GetAddon (string sessionToken, string identifier, string merchantProfileId)
Parameter | Data Type | Description |
sessionToken | string | |
identifier | string | |
merchantProfileId | string |
Data Type | Description |
GetAddonResponse | GetAddonResponse |
GetAddonsResponse GetAddons (string sessionToken, string merchantProfileId)
Parameter | Data Type | Description |
sessionToken | string | |
merchantProfileId | string |
Data Type | Description |
GetAddonsResponse | GetAddonsResponse |
GetAddonsResponse SearchAddons (string sessionToken, SearchTerms terms, string merchantProfileId)
Parameter | Data Type | Description |
sessionToken | string | |
terms | SearchTerms | |
merchantProfileId | string |
Data Type | Description |
GetAddonsResponse | GetAddonsResponse |
Response AssociatePlanWithAddon (string sessionToken, string planId, string addonId, int quantity, string modifiedBy, bool active, string merchantProfileId)
Parameter | Data Type | Description |
sessionToken | string | |
planId | string | |
addonId | string | |
quantity | int | |
modifiedBy | string | |
active | bool | |
merchantProfileId | string |
Data Type | Description |
Response | Response |
IdResponse AssociateSubscriptionWithAddon (string sessionToken, AddonDiscountInfo data, string subscriptionIdentifier, string merchantProfileId)
Parameter | Data Type | Description |
sessionToken | string | |
data | AddonDiscountInfo | |
subscriptionIdentifier | string | |
merchantProfileId | string |
Data Type | Description |
IdResponse | IdResponse |
Gets a specific SubscriptionAddon by the ID we assigned to it when it was created.
GetSubscriptionAddonResponse GetSubAddonByItem (string sessionToken, string itemId, string merchantProfileId)
Parameter | Data Type | Description |
sessionToken | string | |
itemId | string | |
merchantProfileId | string |
Data Type | Description |
GetSubscriptionAddonResponse | GetSubscriptionAddonResponse |
Gets all SubscriptionAddons for a Subscription with a specified Addon Identifier.
GetSubscriptionAddonsResponse GetSubAddonsByAddon (string sessionToken, string addonIdentifier, string subscriptionIdentifier, string merchantProfileId)
Parameter | Data Type | Description |
sessionToken | string | |
addonIdentifier | string | |
subscriptionIdentifier | string | |
merchantProfileId | string |
Data Type | Description |
GetSubscriptionAddonsResponse | GetSubscriptionAddonsResponse |
Gets all SubscriptionAddons for a subscription.
GetSubscriptionAddonsResponse GetSubAddonsBySub (string sessionToken, string subscriptionIdentifier, string merchantProfileId)
Parameter | Data Type | Description |
sessionToken | string | |
subscriptionIdentifier | string | |
merchantProfileId | string |
Data Type | Description |
GetSubscriptionAddonsResponse | GetSubscriptionAddonsResponse |
Updated: June 2, 2017
SUBMIT A DEVELOPER SUPPORT REQUEST
Agent or a merchant? Contact NAB support at 866.485.8999 EXT 2341