Documentation / Integration guide / Part 1 of 18

1. What you build

Your site keeps the article text. Norspire keeps the readers, the plans and the payments. Norspire never holds the text of an article.

You add 2 things to your site:

  • A script tag and 4 elements in your pages. They draw the walls, the meter notice, the account link and the legal links.
  • A server check. Your server asks Norspire for each view of a metered or paid article whether the reader may see the paid part.

The flow of 1 view

  1. A browser asks your server for an article.
  2. Your server calls POST /api/v1/access with the server key, the article reference and the access level. It adds the 2 cookies of the reader, when the browser sent them.
  3. Norspire answers full, registration_wall or paywall.
  4. For full, your server sends the paid part. For each other answer, your server sends the teaser and <norspire-wall>, and no paid part.
  5. The script in the page draws the wall from the data of the publication.
  1. BrowserReader opens the article
  2. 1Requests the article
  3. Site serverHolds the article text
  4. 2POST /api/v1/access
  5. NorspireChecks access
  • 3
    Access grantedfull: your server sends the full article.
  • 3
    Wall shownregistration_wall or paywall: your server sends the teaser and wall element.
1 article view, from browser request to server response.

The flow of 1 log-in

  1. The reader selects Log in in the page. The link opens /login?return=<address of the page> on the subscription host.
  2. The reader logs in on the subscription host. Norspire answers HTTP 303 to the return address with the query value ns_handoff=<code>.
  3. Your server sees ns_handoff. It calls POST /api/v1/handoff with the code and the server key.
  4. Your server sets the reader cookie and answers HTTP 303 to the same address with no ns_handoff.
  5. Each later server check sends the value of the reader cookie. Norspire finds the reader.
1 log-in with a one-time hand-off code.

The flow uses top-level navigations and server calls only. It works with third-party cookies blocked, in each browser, and with JavaScript off.