Blink

Blink

    ›Blink Javascript SDK

    Getting started

    • Overview
    • Quick Start
    • Environments
    • Support

    Panels

    • Basics
    • Panel options
    • Custom content

    User Journeys

    • The basics
    • Conditions
    • Actions
    • Throttles
    • Journey Groups
    • Complete Examples

    Guides

    • How to enable donations

    Blink Javascript SDK

    • Load the SDK
    • Blink managed functions
    • Blink managed variables
    • Reference

      • showDonationModal()
      • promptDonationPopup()
      • promptSubscriptionPopup()
      • isSubscribed()
      • getSubscription()
      • onSubscriptionChange()

    Blink notifications

    • Webhooks
    • Events

      • Subscription created
      • Subscription canceled
      • Subscription reactivated
      • Subscription unpaid
      • Subscription finished
      • Payment created
      • Payment refunded

      Objects

      • Event
      • Subscription
      • Donation
      • Payment
      • Amount
      • User
      • Merchant

    Load the SDK

    To get the SDK, you need to include a Javascript file that will asynchronously load the SDK into your web application.

    • You can include it inside your <head> or <body> tag.
    • You can add the defer or async attributes to this script if page load time is a concern.
    • Once loaded, an object named blinkSDK will be set on the window object, that contains all SDK's public methods

    We recommend serving the SDK from our own hosting service, by including the following script tag in the head of the webpage:

    Production Environment
    Test Environment
    <script src="https://blink.net/1.0/blink-sdk.js?clientId=YOUR_CLIENT_ID" type="text/javascript"></script>
    <script src="https://test.blink.net/1.0/blink-sdk.js?clientId=YOUR_CLIENT_ID" type="text/javascript"></script>

    Do not forget to add your clientId to the query params to initialize the SDK.

    ← How to enable donationsBlink managed functions →
    Blink
    Docs
    Getting StartedPublic API
    Integration
    Donation
    Blink
    Copyright © 2021 Blink Ledger Systems Inc. All rights reserved