Subscribers

List Subscribers

Returns a list of subscribers in your account:

GET /storefronts/:storefront_id/subscribers

Parameters

  • storefront_id - Required Storefront

  • username - Username (the subscriber’s email address)

Response:

[{"id":1,"username":"...",...},{"id":2,"username":"...",...}]

Get Subscriber

Returns information about a single subscriber:

GET /storefronts/:storefront_id/subscribers/:id

The response is a JSON hash with the following attributes:

  • id (integer)

  • created_at (UNIX timestamp)

  • updated_at (UNIX timestamp)

  • username (string)

  • last_login_at (UNIX timestamp)

  • subscription (hash)

The subscription hash has the following attributes:

  • id (integer)

  • status (string) - See below for values.

  • price (string)

  • period (integer)

  • unit (char)

  • tax_amount (string)

  • trial_price (string)

  • trial_period (integer)

  • trial_unit (char)

  • trial_tax_amount (string)

  • created_at (UNIX timestamp)

  • updated_at (UNIX timestamp)

  • started_at (UNIX timestamp)

  • ended_at (UNIX timestamp)

  • trial_started_at (UNIX timestamp)

  • last_payment_at (UNIX timestamp)

  • next_payment_at (UNIX timestamp)

Subscription Statuses

  • NEW - Subscription has not been activated. Subscriber is in the process of checking out or has abandoned signup.

  • TRIAL - Subscription is in the trial period.

  • ACTIVE - Subscription is active without any payment due.

  • CANCELED - Subscription has been canceled but the current term has not ended.

  • CLOSED - Subscription has been canceled and closed.

  • PAST_DUE - Subscription is active but payment is past due. Subscription will be CLOSED if payment is not received.

You can validate a subscriber’s subscription by looking at the subscription.status field. Values of ACTIVE, TRIAL, and PAST_DUE receiving service.

Verify Subscriber

Simple method to get a subscriber’s subscription status:

GET /storefronts/:storefront_id/subscribers/verify

Parameters

  • storefront_id - Required Storefront

  • username - Username (the subscriber’s email address)

  • id - Subscriber ID

Either the username or subscriber_id parameter must be provided. If the subscriber is found it will return the subscriber’s subscription status.

Example

GET /storefronts/1/subscribers/verify?username=test%40example.com