Plan

The plan resource represents an plan or product record that has been synchronized from one or many of the Mesh integrations.

Transaction Providers


Provider Model URL
Stripe Plan https://stripe.com/docs/api#plans

Model


Field Type Description
id string The the Mesh identifier for the plan.
created_at int The original creation date of the plan.
updated_at int The latest update date for the plan.
amount int The amount of the plan.
currency string The currency for the plan.
interval string The interval at which the plan is billed.
name string The name of the plan.
trial_period int The the trial period of the plan/
origin string The origin of the plan.
provider_id string The provider identifier for the plan.
url string The URL for the plan.

Get Plans


Returns a single plan record.

Request

GET http://api.meshdata.io/apps/{app_id}/plans/{plan_id}

Response

HTTP/1.1 200 OK
{
    "amount": 1000,
    "currency": "USD",
    "created_at" : 1243435434543,
    "id": "56a1c9715decd82dd00dfa62",
    "interval": "month",
    "name": "The Best Plan",
    "origin": "stripe",
    "provider_id": "",
    "trial_period": 30,
    "updated_at" : 1243435434543,
    "url": ""
}

Get Plans


Returns a list plan records.

GET http://api.meshdata.io/apps/{app_id}/plans

Response

HTTP/1.1 200 OK
{
    "plans" : [
        {
            "amount": 1000,
            "currency": "USD",
            "created_at" : 1243435434543,
            "id": "56a1c9715decd82dd00dfa62",
            "interval": "month",
            "name": "The Best Plan",
            "origin": "stripe",
            "provider_id": "",
            "trial_period": 30,
            "updated_at" : 1243435434543,
            "url": ""
        },
        {...}
    ]
}

Get Users for Plan


Returns a list of users records that are subscribed to the plan.

Request

GET http://api.meshdata.io/apps/{app_id}/plan/{plan_id}/users

Response

HTTP/1.1 200 OK
{
    "users" : [
        {},
        {...}
    ]
}

Users for Plan


Returns a count of users that are subscribed to a specific plan.

Request

GET http://api.meshdata.io/apps/:app_id/plan/{plan_id}/users

Response

HTTP/1.1 200 OK
{
    "count" : 100
}

results matching ""

    No results matching ""