List Subscription Events

Lists an array of subscription_event objects from your ChartMogul account.

Examples

curl -X GET "https://api.chartmogul.com/v1/subscription_events?per_page=5&event_type=subscription_start&plan_external_id=gold_monthly"\
-u YOUR_API_KEY:\
-H "Content-Type: application/json"
ChartMogul::SubscriptionEvent.all(
  event_type: "subscription_start",
  plan_external_id: "gold_monthly",
  per_page: 5
)
chartmogul.SubscriptionEvent.all(
  config,
  per_page=5,
  event_type='subscription_start',
  plan_external_id='gold_monthly'
)
ChartMogul.SubscriptionEvent.all(config, {
  event_type: "subscription_start",
  plan_external_id: "gold_monthly",
  per_page:5
})
api.ListSubscriptionEvents(
  &FilterSubscriptionEvents{
    PlanExternalID: "gold_monthly",
    EventType: "subscription_start",
  },
  &MetaCursor{}
)
ChartMogul\SubscriptionEvent::all([
  'event_type' => "subscription_start",
  'plan_external_id' => "gold_monthly",
  'per_page' => 5
]);

Result Format

{
    "subscription_events":
    [
        {
            "id": 73966836,
            "data_source_uuid": "ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba",
            "data_source_customer_external_id": "scus_023",
            "subscription_set_external_id": null,
            "subscription_external_id": "sub_0023",
            "plan_external_id": null,
            "event_date": "2022-04-09T11:17:14Z",
            "effective_date": "2022-04-09T10:04:13Z",
            "event_type": "subscription_cancelled",
            "external_id": null,
            "errors":
            {},
            "created_at": "2022-04-09T11:17:14Z",
            "updated_at": "2022-04-09T11:17:14Z",
            "quantity": null,
            "currency": null,
            "amount_in_cents": null,
            "tax_amount_in_cents": null,
            "retracted_event_id": null
        },
        {
            "id": 73966786,
            "data_source_uuid": "1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba",
            "data_source_customer_external_id": "scus_022",
            "subscription_set_external_id": null,
            "subscription_external_id": "sub_0001",
            "plan_external_id": null,
            "event_date": "2022-04-09T11:16:17Z",
            "effective_date": "2022-04-09T10:04:13Z",
            "event_type": "subscription_cancelled",
            "external_id": null,
            "errors":
            {},
            "created_at": "2022-04-09T11:16:17Z",
            "updated_at": "2022-04-09T11:16:17Z",
            "quantity": null,
            "currency": null,
            "amount_in_cents": null,
            "tax_amount_in_cents": null,
            "retracted_event_id": null
        }
    ],
    "meta":
    {
        "next_key": 67048503,
        "prev_key": null,
        "before_key": "2022-04-10T22:27:35.834Z",
        "page": 1,
        "total_pages": 166
    }
}
#<ChartMogul::SubscriptionEvents:0x000000012d47a238
    @meta={
    :next_key=>nil, 
    :prev_key=>nil, 
    :before_key=>"2022-09-26T12:10:07.462Z", 
    :page=>1, 
    :total_pages=>1
  }, 
  @subscription_events=[
    #<ChartMogul::SubscriptionEvent:0x000000012d479f40 
      @id=213378339, 
      @data_source_uuid="ds_02f3be2c-de07-11ec-87b7-8fd3d4e88c46",
      @customer_external_id="test_cus_ext_id", 
      @subscription_set_external_id="", 
      @subscription_external_id="sub_1", 
      @plan_external_id="", 
      @event_date="2022-09-19T09:48:34Z", 
      @effective_date="2022-09-16T00:01:00Z", 
      @event_type="subscription_cancelled", 
      @external_id="subev_3", 
      @errors={}, 
      @created_at="2022-09-26T11:18:21Z",
      @updated_at="2022-09-26T11:18:21Z",
      @quantity="",
      @currency="",
      @amount_in_cents="",
      @tax_amount_in_cents=nil,
      @retracted_event_id=nil
    >, 
    #<ChartMogul::SubscriptionEvent:0x000000012d478cd0
      @id=213361232, 
      @data_source_uuid="ds_02f3be2c-de07-11ec-87b7-8fd3d4e88c46", 
      @customer_external_id="test_cus_ext_id",
      @subscription_set_external_id=nil,
      @subscription_external_id="sub_1",
      @plan_external_id="effd12b0-c034-013a-2b31-2ae6b33040d8", 
      @event_date="2022-09-13T23:00:00Z",
      @effective_date="2022-09-15T23:00:00Z", 
      @event_type="subscription_cancelled", 
      @external_id="subev_2",
      @errors={}, 
      @created_at="2022-09-26T08:29:22Z",
      @updated_at="2022-09-26T08:29:43Z", 
      @quantity=nil,
      @currency="USD",
      @amount_in_cents=nil,
      @tax_amount_in_cents=nil,
      @retracted_event_id=nil
    >
  ]
>
SubscriptionEvents(
  subscription_events=[
    <SubscriptionEvent{
      id=213378339, 
      data_source_uuid="ds_02f3be2c-de07-11ec-87b7-8fd3d4e88c46",
      customer_external_id="test_cus_ext_id", 
      subscription_set_external_id="", 
      subscription_external_id="sub_1", 
      plan_external_id="", 
      event_date="2022-09-19T09:48:34Z", 
      effective_date="2022-09-16T00:01:00Z", 
      event_type="subscription_cancelled", 
      external_id="subev_3", 
      errors={}, 
      created_at="2022-09-26T11:18:21Z",
      updated_at="2022-09-26T11:18:21Z",
      quantity="",
      currency="",
      amount_in_cents="",
      tax_amount_in_cents=None,
      retracted_event_id=None
        }>,
    <SubscriptionEvent{
        id=213361232, 
      data_source_uuid="ds_02f3be2c-de07-11ec-87b7-8fd3d4e88c46", 
      customer_external_id="test_cus_ext_id",
      subscription_set_external_id=None,
      subscription_external_id="sub_1",
      plan_external_id="effd12b0-c034-013a-2b31-2ae6b33040d8", 
      event_date="2022-09-13T23:00:00Z",
      effective_date="2022-09-15T23:00:00Z", 
      event_type="subscription_cancelled", 
      external_id="subev_2",
      errors={}, 
      created_at="2022-09-26T08:29:22Z",
      updated_at="2022-09-26T08:29:43Z", 
      quantity=nil,
      currency="USD",
      amount_in_cents=nil,
      tax_amount_in_cents=None,
      retracted_event_id=None
    }>],
  meta=[
    next_key=None, 
    prev_key=None, 
    before_key="2022-09-26T12:10:07.462Z", 
    page=1, 
    total_pages=1
  ]
)
{
    "subscription_events":
    [
        {
            "id": 73966836,
            "data_source_uuid": "ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba",
            "data_source_customer_external_id": "scus_023",
            "subscription_set_external_id": null,
            "subscription_external_id": "sub_0023",
            "plan_external_id": null,
            "event_date": "2022-04-09T11:17:14Z",
            "effective_date": "2022-04-09T10:04:13Z",
            "event_type": "subscription_cancelled",
            "external_id": null,
            "errors":
            {},
            "created_at": "2022-04-09T11:17:14Z",
            "updated_at": "2022-04-09T11:17:14Z",
            "quantity": null,
            "currency": null,
            "amount_in_cents": null,
            "tax_amount_in_cents": null,
            "retracted_event_id": null
        },
        {
            "id": 73966786,
            "data_source_uuid": "1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba",
            "data_source_customer_external_id": "scus_022",
            "subscription_set_external_id": null,
            "subscription_external_id": "sub_0001",
            "plan_external_id": null,
            "event_date": "2022-04-09T11:16:17Z",
            "effective_date": "2022-04-09T10:04:13Z",
            "event_type": "subscription_cancelled",
            "external_id": null,
            "errors":
            {},
            "created_at": "2022-04-09T11:16:17Z",
            "updated_at": "2022-04-09T11:16:17Z",
            "quantity": null,
            "currency": null,
            "amount_in_cents": null,
            "tax_amount_in_cents": null,
            "retracted_event_id": null
        }
    ],
    "meta":
    {
        "next_key": 67048503,
        "prev_key": null,
        "before_key": "2022-04-10T22:27:35.834Z",
        "page": 1,
        "total_pages": 166
    }
}
(*chartmogul.SubscriptionEvents)(0xc012034b69)({
  SubscriptionEvents: ([]chartmogul.SubscriptionEvent) (len=2) {
    (chartmogul.SubscriptionEvent) {
      ID: (uint64) 23223966
      DataSourceUUID: (string) (len=39) "ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba"
      CustomerExternalID: (string) (len=8) "scus_022"
      SubscriptionSetExternalID: (string) ""
      SubscriptionExternalID: (string) (len=8) "sub_0001")
      PlanExternalID: (string) (len=12) "gold_monthly"
      EventDate: (string) (len=20) "2022-03-30T00:00:00Z")
      EffectiveDate: (string) (len=20) "2022-04-01T00:00:00Z"
      EventType: (string) (len=28) "subscription_start_scheduled"
      ExternalID: (string) (len=8) "evnt_026"
      Errors: (interface{}) {}
      CreatedAt: (string) (len=20) "2022-03-31T11:42:18Z"
      UpdatedAt: (string) (len=20) "2022-03-31T11:42:18Z"
      Quantity: (int32) 1
      Currency: (string) (len=3) "USD")
      AmountInCents: (int32) 1000
      TaxAmountInCents: (int32) 0
      RetractedEventId: (string) ""
    },
    (chartmogul.SubscriptionEvent) {
      ID: (uint64) 23223967
      DataSourceUUID: (string) (len=39) "ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba"
      CustomerExternalID: (string) (len=8) "scus_022"
      SubscriptionSetExternalID: (string) ""
      SubscriptionExternalID: (string) (len=8) "sub_0001")
      PlanExternalID: (string) (len=12) "gold_monthly"
      EventDate: (string) (len=20) "2022-04-01T00:00:00Z")
      EffectiveDate: (string) (len=20) "2022-04-30T00:00:00Z"
      EventType: (string) (len=28) "subscription_start_scheduled"
      ExternalID: (string) (len=8) "evnt_027"
      Errors: (interface{}) {}
      CreatedAt: (string) (len=20) "2022-04-10T11:42:18Z"
      UpdatedAt: (string) (len=20) "2022-04-10T11:42:18Z"
      Quantity: (int32) 1
      Currency: (string) (len=3) "USD")
      AmountInCents: (int32) 100
      TaxAmountInCents: (int32) 0
      RetractedEventId: (string) ""
    },
  },
  MetaCursor: (chartmogul.MetaCursor) {
    NextKey: (uint64) 67048503
    PrevKey: (uint64) 0
    BeforeKey: (string) (len=24) "2022-04-10T22:27:35.834Z"
    Page: (uint64) 1
    TotalPages: (uint64) 166
  }
})
<?php
  Doctrine\Common\Collections\ArrayCollection::__set_state(array(
    "elements" => 
    array (
      0 => 
      ChartMogul\SubscriptionEvent::__set_state(array(
        id=>213378339, 
        data_source_uuid="ds_02f3be2c-de07-11ec-87b7-8fd3d4e88c46",
        customer_external_id="test_cus_ext_id", 
        subscription_set_external_id="", 
        subscription_external_id="sub_1", 
        plan_external_id="", 
        event_date="2022-09-19T09:48:34Z", 
        effective_date="2022-09-16T00:01:00Z", 
        event_type="subscription_cancelled", 
        external_id="subev_3", 
        errors={}, 
        created_at="2022-09-26T11:18:21Z",
        updated_at="2022-09-26T11:18:21Z",
        quantity="",
        currency="",
        amount_in_cents="",
        tax_amount_in_cents=None,
        retracted_event_id=None
      )),
      ChartMogul\SubscriptionEvent::__set_state(array(
        id=>73966786, 
        data_source_uuid="ds_02f3be2c-de07-11ec-87b7-8fd3d4e88c46",
        customer_external_id="test_cus_ext_id", 
        subscription_set_external_id="", 
        subscription_external_id="sub_1", 
        plan_external_id="", 
        event_date="2022-09-19T09:48:34Z", 
        effective_date="2022-09-16T00:01:00Z", 
        event_type="subscription_cancelled", 
        external_id="subev_4", 
        errors={}, 
        created_at="2022-09-26T11:18:21Z",
        updated_at="2022-09-26T11:18:21Z",
        quantity="",
        currency="",
        amount_in_cents="",
        tax_amount_in_cents=None,
        retracted_event_id=None
      )),
    ),
    "next_key" => 67048503,
    "prev_key" => NULL,
    "before_key" => "2022-04-10T22:27:35.834Z",
    "page" => 1,
    "total_pages" => 166
  ));
?>
Language
Authentication
Basic
base64
: