• How it works
  • Partners
  • Blog
  • Docs
  • Sign up
  • Client Area

Ad Publishers

  • Getting started with Ads – Common Issues & FAQs
  • Payment & Fee FAQs
  • Setting up your ads.txt file
  • Installing the ad script on your page
  • Creating an ad placement
  • US Privacy law compliance steps
  • Ad script lifecycle events
  • Detecting ad-blocking users
  • Special ad format: Sticky Stack
  • Placement Configuration API

CMP

  • Adding custom consents or disclosures
  • Creating a link for the user to manage their consents

Sponsor

  • Getting started with Sponsor

Users

  • Getting started with Users
  • Adding the Users SDK to your site
  • Initializing the Users SDK
  • Launching the login/registration screen
  • Managing user sessions
  • Users SDK API Reference
  • NitroPay
  • Docs
  • Sponsor
  • Getting started with Sponsor

Getting started with Sponsor

Table of Contents
  • Disclaimer
  • Create a product
  • Implement the backend SDK
  • Add the client library
  • Initiate the client script

Quick start with NitroPay Sponsor

This product allows you to quickly accept subscription payments from your users in exchange for benefits that you define. Our integrated benefit lets you offer ad-free browsing to your subscribed users.

Disclaimer #

This is not an out-of-box user system and we don’t currently offer adapters for common systems. Setup will require an intermediate level of backend and frontend development.

Create a product #

The first step is to create a product in the NitroPay panel. Within your product, you’ll define one or more tiers that offer various benefits and payment terms to your users.

Implement the backend SDK #

We support official SDKs for the languages listed below. Setup instructions are language-specific, follow the links to read more.

  • Go
  • Node.js
  • PHP
  • Python

Add the client library #

The following code does not require any site-specific updates, but it must be present in the html <head> of your website.

<script type="text/javascript">
  window.nitroSponsor = window.nitroSponsor || {
    init: function() {
      window.nitroSponsor.queue.push(["init", arguments]);
    },
    status: "init",
    queue: []
  };
</script>
<script async src="https://s.nitropay.com/sponsor.js"></script>

Initiate the client script #

After you have verified that your user is authenticated, you’ll need to create a secure token using the backend SDK. Once the token is available in the client, you can initialize the client library like so:

window["nitroSponsor"].init(
  {
    token: "USER_TOKEN",
    successUrl: "https://example.com/success",
    cancelUrl: "https://example.com/cancel",
    product: 12345
  },
  function(res) {
    // success callback
    console.log(res);
  }
);

The first parameter configuration is shown above and the second is an optional callback that returns the user response.

Share this document:
  • Facebook
  • Twitter
  • LinkedIn
Updated on January 25, 2023
Table of Contents
  • Disclaimer
  • Create a product
  • Implement the backend SDK
  • Add the client library
  • Initiate the client script
© GG Software, LP
Privacy Policy | Terms of Use | Contact us