You must be 18+ to visit this website
The content on this website is AGE RESTRICTED
Please confirm you are at least 18 years old of age. Otherwise leave the website.

Webhooks Integration


How it works

After your profile is approved, webhooks can be enabled upon request.

  1. You specify Webhooks endpoint under https://www.subscribestar.com/profile/settings
  2. You start receiving POST requests as described in the section below

At the moment we do not resend webhooks if your application responds with an error or fails to respond within 10 seconds.


Security

Find X-SubscribeStar-Signature in the headers: 


Then compare signature with the HEX digest of MD5 HMAC signed request body (the JSON string you receive from us) using your webhook's secret:
request.headers['X-SubscribeStar-Signature'] == OpenSSL::HMAC.hexdigest("MD5", secret, request.body)

Where secret is taken from your Profile Settings -> Webhooks section on the site. Request body is a JSON string.

Subscription Events

EVENT TYPES (see below, payload key is "event"):
  • email_shared
  • email_unshared
  • new_subscription
  • recurring_pledge_decreased
  • recurring_pledge_increased
  • shipping_address_shared
  • shipping_address_unshared
  • subscription_billing_failed
  • subscription_cancelled

PAYLOAD

{
  "payload": {
      "subscription": {
                                      "id": 10059451,
                                 "tier_id": 129388,      # Unique identifier of the tier (same across all subscribers in the current tier)
                                    "cost": 10000,       # ALWAYS IN CENTS (IN THIS CASE == $100.00)
                     "last_payment_amount": 10000,       # CAN BE NULL OR NOT EQUAL TO SUBSCRIPTION PRICE IN CASE IF THE LAST PAYMENT IS UNDER REVIEW OR TIER HAS BEEN DOWNGRADED!
          "last_payment_settlement_amount": 10000,       # CAN BE NULL OR NOT EQUAL TO SUBSCRIPTION PRICE IN CASE IF THE LAST PAYMENT IS UNDER REVIEW OR TIER HAS BEEN DOWNGRADED!
                           "subscriber_id": 91953,
                    "created_at_timestamp": 1573138322,
                    "charged_at_timestamp": 1573138322,
                   "extended_at_timestamp": 1573138322,  # THE DATE FROM WHICH WE COUNT NEXT RECURRING BILLING DATE (USUALLY EQUAL TO CHARGED_AT)
                              "profile_id": 1,           # YOUR STAR PROFILE ID
                          "billing_failed": false,
             "billing_failed_at_timestamp": null,
                               "cancelled": false,
                  "cancelled_at_timestamp": null,
                                  "paused": false,
                     "paused_at_timestamp": null,
                             "restored_at": null,
                                 "trusted": false        # PASSED TRUSTED PERIOD (SEE PROFILE SETTINGS)
      },
      "subscriber": {
                 "email": "[email protected]",
              "nickname": "John Doe",
                    "id": 91953
      }
  },
      "event": "new_subscription", # CAB BE: "email_shared", "email_unshared", "shipping_address_shared", "shipping_address_unshared", "recurring_pledge_increased", "recurring_pledge_decreased", "subscription_billing_failed", "new_subscription", "subscription_cancelled"
    "project": "subscribestar",
  "timestamp": 1573138322
}

Payment Events

EVENT TYPES (see below, payload key is "event"):
  • payment_disputed
  • payment_succeed
PAYLOAD
{
  "payload": {
      "payment": {
                               "id": 1239168,
                           "amount": 10000,
                "settlement_amount": 9820,               # HOW MUCH STAR EARNS FROM THIS TRANSACTION
          "authorized_at_timestamp": 1573138322,         # ALWAYS RELY ON THIS DATE OF THE ACTUAL TRANSACTION
            "captured_at_timestamp": 0,
                    "subscriber_id": 91953,
                  "subscription_id": 59451,
                           "tip_id": null,               # NOT NULL IF TIP
                          "comment": "Thank you!",       # A USER MESSAGE FROM THE TIPPING FORM
                       "profile_id": 1,
                             "type": "subscription_fee"  # CAN BE: "subscription_fee", "contribution", "tip"
      },
      "pledger": {
                 "email": "[email protected]",
              "nickname": "John Doe",
                    "id": 91953,
          "pledger_type": "subscriber"
      }
  },
      "event": "payment_succeed", # CAN BE: "payment_disputed", "payment_succeed"
    "project": "subscribestar",
  "timestamp": 1573138672

Before you launch

Please test it out using http://webhook.site/ before going fully live.
WE USE COOKIES

SubscribeStar and its trusted third parties collect browsing information as specified in the Privacy Policy and use cookies or similar technologies for analysis and technical purposes and, with your consent, for functionality, experience, and measurement as specified in the Cookies Policy.

Your Privacy Choices

We understand and respect your privacy concerns. However, some cookies are strictly necessary for proper website's functionality and cannon be denied.

Optional cookies are configurable. Disabling some of those may make related features unavailable.

We do NOT sell any information obtained through cookies to third-party marketing services.