Blink

Blink

    ›Objects

    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

    Subscription Object

    Example

    {
            "id": "360262023772113421",
            "status": "active",
            "coverage": {
              "name": "Print and digital",
              "blinkCoverage": "*",
              "extraCoverage": null
            },
            "amount": {
                "amount": "2.00",
                "currency": "usd",
                "amountPrecise": 2000000,
                "amountInSubunits": 200,
                "amountPreciseExponent": 6
            },
            "discount": {
              "code": "BLACK_FRIDAY_50",
              "name": "before",
              "value": "50.00% off"
            },
            "createdAt": "2020-11-25T12:35:42.263635Z",
            "paidUntil": "2020-12-02T12:35:42.263635Z",
            "cycleDuration": "week",
            "deliveryAddress": {
              "city": "New York",
              "name": null,
              "state": "NY",
              "country": "United States",
              "address1": "20 Cooper Square",
              "address2": null,
              "postalCode": "10011",
              "countryCode": "US"
            }
    }
    

    Description

    nametypealways presentdescription
    idString☑subscription's unique id
    statusString☑subscription's status. can be one of active/canceled/finished/unpaid
    coverageObject☑subscriptions' coverage, defined by a coverage object
    amountObject☐subscription's amount, defined by an amount object.
    discountObject☑subscription's discount, defined by a discount object.
    Can be null.
    createdAtString☑subscription's creation date
    paidUntilString☑subscription's expiration date
    cycleDurationString☑String representation of subscription's cycle duration.
    amount(if greater than 1)+ day/week/month/year
    Example: week, 2year, 7day
    deliveryAddressObject☑subscription's address, defined by an address object.
    Can be null.

    Coverage Object

    Example

    {
        "name": "Print and digital",
        "blinkCoverage": "*",
        "extraCoverage": null
    }
    

    Description

    nametypealways presentdescription
    nameString☑user friendly subscription coverage name that is shown to the user when selecting the subscription plan
    blinkCoverageString☑comma separated keywords used to describe the digital coverage. * means everything is covered
    extraCoverageString☑optional free format String that be used by merchant to define its own coverage. It's null if not set.

    Discount Object

    Example

    {
        "code": "BLACK_FRIDAY_50",
        "name": "before",
        "value": "50.00% off"
    }
    

    Description

    nametypealways presentdescription
    codeString☑discount code that can be used by users when subscribing
    nameString☑a human readable name for the discount code
    valueString☑string representation of the discount policy

    Address Object

    Example

    {
        "city": "New York",
        "name": null,
        "state": "NY",
        "country": "United States",
        "address1": "20 Cooper Square",
        "address2": null,
        "postalCode": "10011",
        "countryCode": "US"
    }
    

    Description

    nametypealways presentdescription
    cityString☑address's city
    nameString☑address's contact person name.
    Can be null
    stateString☑address's state
    countryString☑address's country
    address1String☑address line 1
    address2String☑address line 2.
    Can be null.
    postalCodeString☑address's zip code.
    Can be null.
    countryCodeString☑address's country code
    ← EventDonation →
    Blink
    Docs
    Getting StartedPublic API
    Integration
    Donation
    Blink
    Copyright © 2021 Blink Ledger Systems Inc. All rights reserved