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_cancelled&plan_external_id=gold_monthly" \
     -u YOUR_API_KEY: \
     -H "Content-Type: application/json"
ChartMogul::SubscriptionEvent.all(
  event_type: "subscription_cancelled",
  plan_external_id: "gold_monthly",
  per_page: 5,
)
ChartMogul.SubscriptionEvent.all(config, {
  event_type: "subscription_cancelled",
  plan_external_id: "gold_monthly",
  per_page: 5,
});
ChartMogul\SubscriptionEvent::all([
  "event_type" => "subscription_cancelled",
  "plan_external_id" => "gold_monthly",
  "per_page" => 5
]);
api.ListSubscriptionEvents(
  &cm.FilterSubscriptionEvents{
    PlanExternalID: "gold_monthly",
    EventType:      "subscription_cancelled",
  },
  &cm.MetaCursor{},
)
chartmogul.SubscriptionEvent.all(
  config,
  per_page=5,
  event_type="subscription_cancelled",
  plan_external_id="gold_monthly",
)

Result Format

{
  "subscription_events": [
    {
      "id": 73966836,
      "data_source_uuid": "ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba",
      "data_source_customer_external_id": "cus_0001",
      "subscription_set_external_id": null,
      "subscription_external_id": "sub_0001",
      "plan_external_id": "gold_monthly",
      "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,
      "event_order": 100,
      "retracted_event_id": null
    },
    {
      "id": 73966786,
      "data_source_uuid": "ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba",
      "data_source_customer_external_id": "cus_0002",
      "subscription_set_external_id": null,
      "subscription_external_id": "sub_0002",
      "plan_external_id": "gold_monthly",
      "event_date": "2022-04-09T11:16:17Z",
      "effective_date": "2022-04-09T11:16:17Z",
      "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,
      "event_order": null,
      "retracted_event_id": null
    }
  ],
  "meta": {
    "next_key": null,
    "prev_key": null,
    "before_key": "2022-04-10T22:27:35.834Z",
    "page": 1,
    "total_pages": 1
  },
  "cursor": "AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
  "has_more": true
}
#<ChartMogul::SubscriptionEvents:0x000000012d47a238
	@meta={ # deprecated with version 4.0.0
    :next_key=>nil, 
    :prev_key=>nil, 
    :before_key=>"2022-04-10T22:27:35.834Z", 
    :page=>1, 
    :total_pages=>1
  }, 
  @subscription_events=[
    #<ChartMogul::SubscriptionEvent:0x000000012d479f40 
      @id=73966836, 
      @data_source_uuid="ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba",
      @customer_external_id="cus_0001", 
      @subscription_set_external_id="", 
      @subscription_external_id="sub_0001", 
      @plan_external_id="gold_monthly", 
      @event_date="2022-04-09T11:17:14Z", 
      @effective_date="2022-04-09T10:04:13Z", 
      @event_type="subscription_cancelled", 
      @external_id="", 
      @errors={}, 
      @created_at="2022-04-09T11:17:14Z",
      @updated_at="2022-04-09T11:17:14Z",
      @quantity="",
      @currency="",
      @amount_in_cents="",
      @tax_amount_in_cents=nil,
      @retracted_event_id=nil
    >, 
    #<ChartMogul::SubscriptionEvent:0x000000012d478cd0
      @id=73966786, 
      @data_source_uuid="ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba", 
      @customer_external_id="cus_0002",
      @subscription_set_external_id=nil,
      @subscription_external_id="sub_0002",
      @plan_external_id="gold_monthly", 
      @event_date="2022-09-13T23:00:00Z",
      @effective_date="2022-09-15T23:00:00Z", 
      @event_type="subscription_cancelled", 
      @external_id="",
      @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
    >
  ],
  @has_more=true, 
	@cursor="AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k"
>
{
  subscription_events: [
    {
      id: 73966836,
      data_source_uuid: "ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba",
      data_source_customer_external_id: "cus_0001",
      subscription_set_external_id: null,
      subscription_external_id: "sub_0001",
      plan_external_id: "gold_monthly",
      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,
      event_order: 100,
      retracted_event_id: null
    },
    {
      id: 73966786,
      data_source_uuid: "ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba",
      data_source_customer_external_id: "cus_0002",
      subscription_set_external_id: null,
      subscription_external_id: "sub_0002",
      plan_external_id: "gold_monthly",
      event_date: "2022-04-09T11:16:17Z",
      effective_date: "2022-04-09T11:16:17Z",
      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,
      event_order: null,
      retracted_event_id: null
    }
  ],
  meta: {
    next_key: null,
    prev_key: null,
    before_key: "2022-04-10T22:27:35.834Z",
    page: 1,
    total_pages: 1
  },
  cursor: "AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
  has_more: true
}
Doctrine\Common\Collections\ArrayCollection::__set_state(array(
  "elements" => 
  array (
    0 => 
    ChartMogul\SubscriptionEvent::__set_state(array(
      id=>73966836, 
      data_source_uuid="ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba",
      customer_external_id="cus_0001", 
      subscription_set_external_id="", 
      subscription_external_id="sub_0001", 
      plan_external_id="gold_monthly", 
      event_date="2022-04-09T11:17:14Z", 
      effective_date="2022-04-09T10:04:13Z", 
      event_type="subscription_cancelled", 
      external_id="", 
      errors={}, 
      created_at="2022-04-09T11:17:14Z",
      updated_at="2022-04-09T11:17:14Z",
      quantity="",
      currency="",
      amount_in_cents="",
      tax_amount_in_cents=None,
      event_order=100,
      retracted_event_id=None
    )),
    ChartMogul\SubscriptionEvent::__set_state(array(
      id=>73966786, 
      data_source_uuid="ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba",
      customer_external_id="cus_0002", 
      subscription_set_external_id="", 
      subscription_external_id="sub_0002", 
      plan_external_id="gold_monthly", 
      event_date="2022-04-09T11:17:14Z", 
      effective_date="2022-04-09T10:04:13Z", 
      event_type="subscription_cancelled", 
      external_id="", 
      errors={}, 
      created_at="2022-04-09T11:17:14Z",
      updated_at="2022-04-09T11:17:14Z",
      quantity="",
      currency="",
      amount_in_cents="",
      tax_amount_in_cents=None,
      event_order=100,
      retracted_event_id=None
    )),
  ),
  "next_key" => NULL, # deprecated with version 6.0.0
  "prev_key" => NULL, # deprecated with version 6.0.0
  "before_key" => "2022-04-10T22:27:35.834Z", # deprecated with version 6.0.0
  "page" => 1, # deprecated with version 6.0.0
  "total_pages" => 1, # deprecated with version 6.0.0
  "cursor" => "AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
  "has_more" => true
  )
);
(*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) "cus_0001",
    SubscriptionSetExternalID: (string) "",
    SubscriptionExternalID: (string) (len=8) "sub_0001",
    PlanExternalID: (string) (len=12) "gold_monthly",
    EventDate: (string) (len=20) "2022-04-09T11:17:14Z",
    EffectiveDate: (string) (len=20) "2022-04-09T10:04:13Z",
    EventType: (string) (len=28) "subscription_cancelled",
    ExternalID: (string) (len=8) "",
    Errors: (interface{}) {},
    CreatedAt: (string) (len=20) "2022-04-09T11:17:14Z",
    UpdatedAt: (string) (len=20) "2022-04-09T11:17:14Z",
    Quantity: (int32) 1,
    Currency: (string) (len=3) "USD",
    AmountInCents: (int32) 1000,
    TaxAmountInCents: (int32) 0,
    EventOrder: (int32)100,
    RetractedEventId: (string) "",
    },
    (chartmogul.SubscriptionEvent) {
    ID: (uint64) 23223967
    DataSourceUUID: (string) (len=39) "ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba",
    CustomerExternalID: (string) (len=8) "cus_0002",
    SubscriptionSetExternalID: (string) "",
    SubscriptionExternalID: (string) (len=8) "sub_0001",
    PlanExternalID: (string) (len=12) "gold_monthly",
    EventDate: (string) (len=20) "2022-04-09T11:16:17Z",
    EffectiveDate: (string) (len=20) "2022-04-09T11:16:17Z",
    EventType: (string) (len=28) "subscription_cancelled",
    ExternalID: (string) (len=8) "",
    Errors: (interface{}) {},
    CreatedAt: (string) (len=20) "2022-04-09T11:16:17Z",
    UpdatedAt: (string) (len=20) "2022-04-09T11:16:17Z",
    Quantity: (int32) 1,
    Currency: (string) (len=3) "USD",
    AmountInCents: (int32) 100,
    TaxAmountInCents: (int32) 0,
    EventOrder: (int32)100,
    RetractedEventId: (string) "",
    },
  },
  MetaCursor: (chartmogul.MetaCursor) { // deprecated with version v4
    NextKey: (uint64) 0
    PrevKey: (uint64) 0
    BeforeKey: (string) (len=24) "2022-04-10T22:27:35.834Z"
    Page: (uint64) 1
    TotalPages: (uint64) 1
  },
  Cursor: (string) (len=44) "AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
  HasMore: (bool) true
})
SubscriptionEvents(
  subscription_events=[
    <SubscriptionEvent{
      id=73966836, 
      data_source_uuid="ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba",
      customer_external_id="cus_0001", 
      subscription_set_external_id="", 
      subscription_external_id="sub_0001", 
      plan_external_id="gold_monthly", 
      event_date="2022-04-09T11:17:14Z", 
      effective_date="2022-04-09T10:04:13Z", 
      event_type="subscription_cancelled", 
      external_id="", 
      errors={}, 
      created_at="2022-04-09T11:17:14Z",
      updated_at="2022-04-09T11:17:14Z",
      quantity="",
      currency="",
      amount_in_cents="",
      tax_amount_in_cents=None,
      event_order=100,
      retracted_event_id=None
    }>,
    <SubscriptionEvent{
    	id=73966786, 
      data_source_uuid="ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba", 
      customer_external_id="cus_0002",
      subscription_set_external_id=None,
      subscription_external_id="sub_0002",
      plan_external_id="gold_monthly", 
      event_date="2022-04-09T11:16:17Z",
      effective_date="2022-04-09T11:16:17Z", 
      event_type="subscription_cancelled", 
      external_id="",
      errors={}, 
      created_at="2022-04-09T11:16:17Z",
      updated_at="2022-04-09T11:16:17Z", 
      quantity=nil,
      currency="USD",
      amount_in_cents=nil,
      tax_amount_in_cents=None,
      event_order=100,
      retracted_event_id=None
    }>],
  meta=[ # deprecated with version 4.0.0
    next_key=None, 
    prev_key=None, 
    before_key="2022-04-10T22:27:35.834Z", 
    page=1, 
    total_pages=1
  ],
  cursor='AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k',
	has_more=True
)
Language
Authorization
Basic
base64
: