MonetizationOS Docs
Workflows ReferenceType Definitions

WorkflowStripeSubscriptionUtils

type WorkflowStripeSubscriptionUtils = {
  integrations: {
     stripe: {
        getSubscriptions: Promise<WorkflowStripeSubscription[]>;
     };
  };
};

Stored Stripe subscriptions for surface workflows. Surfaces receive this without WorkflowIntegrationUtils, so they cannot call the Stripe API.

Properties

integrations

integrations: {
  stripe: {
     getSubscriptions: Promise<WorkflowStripeSubscription[]>;
  };
};
  • stripe

    stripe: {
      getSubscriptions: Promise<WorkflowStripeSubscription[]>;
    };

    stripe.getSubscriptions()

    getSubscriptions(identity): Promise<WorkflowStripeSubscription[]>;

    Returns the Stripe subscriptions stored for an identity.

    This reads the stored snapshot, not the Stripe API. Stripe's subscription list omits canceled subscriptions, so an ended subscription disappears from this result rather than remaining with status 'canceled'. Cancellation times are epoch milliseconds. Older stored subscriptions have null dates and cancelAtPeriodEnd false.

    Parameters
    ParameterTypeDescription
    identityWorkflowUserIdentifierThe user whose stored subscriptions to read.
    Returns

    Promise<WorkflowStripeSubscription[]>

On this page