Link

The subscription object

This is an object representing a subscription associated with a subsciber.

Attributes
start_timestamp DateTime
UTC Timestamp of when subscription gets activated
end_timestamp DateTime
UTC Timestamp of when subscription expires
next_payment_due_date DateTime
UTC Timestamp of next payemnt is due to happen in case of recurring subscriptions
metadata Hash
any free form data that needs to be associated with subscription.
notes String
any notes that needs to be associated with subscription.
payment_amount Number
Amount paid
payment_amount_cents Number
Amount paid in cents
payment_amount_curreny String
Amount paid currency
payment_token String
Unique identifier of payment received from payment gateway
payment_type String
Can be one of Payment Types
status String
Can be one of Subscription Status
coupon_code String
Discount voucher code used
cancelled Boolean
True if subscription is cancelled
in_trial_period Boolean
True if subscription is in trial period
in_grace_period Boolean
True if subscription is in grace period
expired Boolean
True if subscription is expired
active Boolean
True if subscription is active
recurring Boolean
True if subscription is recurring. False if its onetime
discount_detail Hash
Details of discount applied(if any)
subscriber Hash
Subscriber object
invoices Array
Array of invoice objects. Can have more than one invoices for recurring subscriptions
assets Array
Array of asset objects. Provides details of assets that are part of the subscription and are same as that of the plan purchased
subscription_type string
Can be one of Subscription Types
    {
        "id": 5076,
        "subscriber_id": 5094,
        "subscription_plan_id": 6,
        "created_at": "2020-05-29T07:45:29.184Z",
        "updated_at": "2020-05-29T07:45:29.184Z",
        "assets": [
            {
            "title": "complete site",
            "metadata": {},
            "type": "site",
            "published_at": {}
            }
        ],
        "start_timestamp": "2020-05-29T07:45:27.443Z",
        "end_timestamp": "2020-06-29T07:45:27.443Z",
        "deleted_at": null,
        "payment_id": 5073,
        "metadata": {
            "full-name": "test bacradi gpay",
            "email": "test@bacardi.com"
        },
        "external_id": null,
        "trial_period_length": null,
        "trial_period_unit": null,
        "campaign_id": null,
        "plan_amount_cents": 120000,
        "plan_amount_currency": "INR",
        "duration_unit": "months",
        "duration_length": 1,
        "plan_name": "Gold-12 months",
        "plan_description": "vd",
        "group_name": "Gold",
        "group_description": "Silver + Access to Exclusive Reportage + Monthly round-up magazines",
        "subscription_type": "standard",
        "plan_occurrence": "Recurring",
        "subscription_attempt_id": 5287,
        "renewal_reminder_sent_date": null,
        "dynamic_assets": {},
        "coupon_discount_id": null,
        "notes": null,
        "account_id": null,
        "old_assets": null,
        "user_limit": null,
        "subscription_group_id": 3,
        "preferred_identity": {
            "provider": "email",
            "value": "test@bacardi.com"
        },
        "active": true,
        "payment_amount": "200.00",
        "payment_amount_cents": 20000,
        "payment_amount_currency": "INR",
        "payment_type": "androidpay_recurring",
        "payment_token": "pbmjbjelfcjhpadngfefgjji.AO-J1Oz1YFEYU8hdJtjWHIOAWsnVVaFx7Uw2aoTAhI_pZf9TVsLnvU_yJLf1GoS9UD2l5L3IJJza7Kl9aSaKPKr0YpuBJLixuNyMMdqABWXJKrW1cSv4iMk",
        "renewable": false,
        "status": "active",
        "expired": false,
        "coupon_code": null,
        "recurring": true,
        "cancelled_at": null,
        "next_payment_due_date": "2020-06-29T07:45:27.443Z",
        "cancelled": false,
        "in_grace_period": false,
        "invoices": [
            {
                "id": 5068,
                "sequenced_invoice_number": "BQ/1819/SUB/81",
                "base_price": "169.49",
                "amount_cents": 20000,
                "amount_currency": "INR",
                "created_at": "2020-05-29T07:45:29.558Z",
                "amount_after_discount_before_tax": "169.49",
                "discount_details": {},
                "invoice_taxes": {
                    "CGST": {
                        "percentage": "9.0",
                        "amount": "15.25",
                        "currency": "INR"
                    },
                    "SGST": {
                        "percentage": "9.0",
                        "amount": "15.25",
                        "currency": "INR"
                    }
                },
                "round_off": "0.01",
                "external_payment_id": "GPA.3316-7874-6202-40089",
                "downloadable": false
            }
        ],
        "subscriber_name": "test bacradi gpay",
        "discount_detail": {},
        "referrer": null,
        "gifter": null,
        "created_by": null,
        "subscriber": {
            "id": 5094,
            "name": null,
            "created_at": "2020-05-28T09:06:40.055Z",
            "updated_at": "2020-05-28T09:06:40.055Z",
            "metadata": null,
            "cumulative_end_timestamps": {
                "standard_subscriptions_cumulative_end_timestamp": "2020-06-29T07:45:27.443Z",
                "campaign_subscriptions_cumulative_end_timestamp": "2020-06-29T07:45:27.443Z"
            },
            "subscriber_identities": [
                {
                    "provider": "email",
                    "value": "test@bacardi.com"
                }
            ]
        },
        "expires_in_days": 31,
        "in_trial_period": false
    }