Subscriptions

List Subscriptions

Changed on

Returns a list of your subscriptions, most recent first. Optionally filter by customer or status. Use expand (or expand_customer) to inline related objects such as the customer, latest invoice, item prices, or applied discounts.

get/v1/subscriptions

Request

  • Base URL
    https://api.withflex.com
  • URL
    https://api.withflex.com/v1/subscriptions
  • Auth
    HTTP bearer

Query parameters

customerstring nullable

Filter by customer ID.

Example:fcus_01J9XR8M3K7VZ8N2YB4WJ6T0RA
expand_customerboolean nullable

If true, expands the customer object in the response.

starting_afterstring nullable

A cursor for use in pagination. starting_after is a subscription ID that defines your place in the list. For instance, if you make a list request and receive 20 subscriptions, ending with fsub_xyz, your subsequent call can include starting_after=fsub_xyz to fetch the next page.

Example:fsub_01J9XR8M3K7VZ8N2YB4WJ6T0RA
ending_beforestring nullable

A cursor for use in pagination. ending_before is a subscription ID that defines your place in the list. For instance, if you make a list request and receive 20 subscriptions, starting with fsub_abc, your subsequent call can include ending_before=fsub_abc to fetch the previous page.

Example:fsub_01J9XR8M3K7VZ8N2YB4WJ6T0RA
status'incomplete' | 'incomplete_expired' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid' | 'paused'

The current lifecycle status of the subscription.

Example:incomplete

Filter by subscription status.

offsetinteger nullable

Number of objects to skip before returning results.

Example:3
limitinteger nullable

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

Example:10
expandstring

Comma-separated list of related objects to expand in the response.

Supported keys: customer; latest_invoice (alias invoice); payment_method; backup_payment_method; price (alias product); and discounts. Combine discounts with coupons (expand=discounts,coupons) to hydrate each discount's nested source.coupon into a full object instead of a bare ID.

Unrecognized keys are ignored rather than rejected: a misspelled or guessed key (e.g. coupon) returns the same response as no expand at all, with no error.

Response

An envelope wrapping a list of subscription objects.

Example response

{
  "subscriptions": [
    {
      "subscription_id": "fsub_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "created_at": "2026-06-15T14:30:00Z",
      "items": [
        {
          "subscription_item_id": "fsubi_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
          "price": "fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
          "quantity": 2500,
          "created_at": "2026-06-15T14:30:00Z",
          "updated_at": "2026-06-15T14:30:00Z",
          "test_mode": false
        }
      ],
      "latest_invoice": "fin_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "customer": "fcus_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "status": "incomplete",
      "cancel_at_period_end": false,
      "current_period_end": "string",
      "current_period_start": "string",
      "metadata": {
        "order_id": "8842",
        "channel": "shopify"
      },
      "test_mode": false,
      "client_secret": {
        "setup_secret": "string",
        "payment_secret": "string"
      },
      "proration_behavior": "always_invoice",
      "trial_start": "string",
      "trial_end": "string",
      "cancel_at": "2026-06-15T14:30:00Z",
      "canceled_at": "2026-06-15T14:30:00Z",
      "default_payment_method": "fpm_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "backup_payment_method": "fpm_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "discounts": [
        {
          "discount_id": "fdi_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
          "checkout_session": "fcs_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
          "customer": "fcus_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
          "subscription": "fsub_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
          "invoice": "fin_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
          "source": {
            "coupon": "fcoup_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
            "type": "coupon"
          },
          "promo_code": "fpromo_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
          "test_mode": false,
          "end": "string",
          "start": "string"
        }
      ],
      "pause": {
        "paused_at": "2026-06-15T14:30:00Z",
        "resume_at": "2026-06-15T14:30:00Z",
        "billing_cycle_anchor": "unchanged",
        "proration_behavior": "always_invoice",
        "credit": "unused_time"
      }
    }
  ]
}

Changes

    • breaking

      the /////////// response's property format changed from email to no format for status

    • breaking

      the //////////////// response's property format changed from email to no format for status

    • warning

      for the query request parameter limit, the max was set to 2147483647.00

    • warning

      for the query request parameter offset, the max was set to 2147483647.00

    • warning

      added the new adaptiveShoesDependent enum value to the ////////////////// response property for the response status

    • warning

      added the new automatedCleaner enum value to the ////////////////// response property for the response status

    • warning

      added the new babyMonitorSplit enum value to the ////////////////// response property for the response status

    • warning

      added the new babySleepApp enum value to the ////////////////// response property for the response status

    • warning

      added the new bodyPillow enum value to the ////////////////// response property for the response status

    • warning

      added the new breathWorkDependent enum value to the ////////////////// response property for the response status

    • warning

      added the new coolingSleepwear enum value to the ////////////////// response property for the response status

    • warning

      added the new meneralsNootropicPouch enum value to the ////////////////// response property for the response status

    • warning

      added the new nonenalOdor enum value to the ////////////////// response property for the response status

    • warning

      added the new nursingChairs enum value to the ////////////////// response property for the response status

    • warning

      added the new speechHealthDependent enum value to the ////////////////// response property for the response status

    • warning

      added the new uvClothing enum value to the ////////////////// response property for the response status

    • warning

      added the new uvGlasses enum value to the ////////////////// response property for the response status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property // to the response with the status