Subscriptions Overview

The CODE Magazine subscription system consists of two parts:

  1. The web site that allows subscribers to sign up
  2. The back-end services (Microservices) that make up most of the logic of the system

Subscriptions can either be new subscriptions, or they can be renewal of an existing subscription. Both are handled by the same code/logic, although the URL seen in the browser is different, and different parameters are passed to the page.

Initial Display of Options on the Page

The first step, when a user navigates to the subscription/renewal page is to figure out what options are available to the user. The logic for that is this:

More Info About Addresses

It can be confusing which addresses or parts of addresses can be changed. The delivery address can generally be changed, but not the country, as the country is driven by the initial choice. However, if the overall country is changed, it also changes in the delivery address UI, including address formats. The billing address can be changed freely. The address in the credit card must match the address on file with the credit card company. This enables relatively complex scenarios. For instance, someone could subscribe with a delivery address in Texas, but have EPS Austria be the true customer (thus the billing address - which is on the invoice - shows the company/address in Austria), yet the user uses a personal credit card with an associated address in Hawaii (and would then, presumably, be reimbursed by the Austrian company).

Only for Renewals


The system supports coupons in a variety of ways. Typically, a coupon code can be passed on the URL. It can also be entered manually (if no coupon is otherwise defined) if the subscription price resulting from the offer is greater than zero.

The value (and validity) is evaluated based on the following rules (on the client):

Note that it is possible that the coupon is passed along as part of the URL (see above). It is also possible to enter a coupon in a coupon UI. The rules for that are as follows:

Submitting the Order

Once a user has chosen all the desired options for the subscription/renewal, the system performs the following tasks:

About Address Matching

We have a pretty good process in place to match addresses. We also have a good process in place to verify US addresses and change their format to what the USPS expects, since we call their service for verification. However, the combination of these two processes causes some odd scenarios.

Consider this address that we may enter during the subscription process:

385 Kualono Pl.
96753, Kihei, HI

When we run this through the USPS address verification processor, it is changed to the following:

96753-7769, WAILEA, HI

Those two addresses are identical, and we recognize this, because if we see that the addresses are both from the US, and one is verified but the other isn't, we also verify the unverified one on the fly, and check for a match then. This is slow, but it works mroe reliably than our previous process. Having added this ability (as well as fixing a number of special case scenarios we had previously), made our address verification system much more reliable and fixed several problems that used to plague us. When we compare addresses, we do NOT consider the 4-digit ZIP extension used by US addresses to be meaningful. In other words: addresses with and without the 4-digit ZIP extension are considered to be equal as long as all other fields match.

User Interface Examples

Subscription HTML UI Examples

The following is an exaple UI from a default subscription. Note the different options for print/digital, duration, and number of copies:

Compare the above to the following screen shot, which is based on a free subscription offer for Microsoft Regional Directors. Note that it does not have the duration options, and it doesn't allow for the number of copies to be selected:

Note that the price is free, even though the customer chose to have a print & digital combo subscription. That is because this is a free offer (even for print) for US customers. However, if the delivery region changed to something else, the print option now has to be paid (although if the user was to choose digital only, it woudl still be free), and accordingly, credit card UIs and logic would now kick in:

The following example shows a US address being edited:

If the country is changed to someting else however, the address format would change:

Here is the credit card UI:

Also note how the UI responsively changes for narrow browser widths or mobile devices: