@bates-solutions/squareup API Reference - v3.2.0
    Preparing search index...

    Interface CreateSubscriptionOptions

    Options for creating a subscription.

    One of planVariationId or phases[] must be provided. A plan variation drives flat-rate (STATIC) or percentage-of-template (RELATIVE) pricing; phases drive product-based billing from order templates.

    interface CreateSubscriptionOptions {
        cardId?: string;
        customerId: string;
        idempotencyKey: string;
        locationId?: string;
        phases?: SubscriptionPhaseInput[];
        planVariationId?: string;
        priceOverride?: number;
        startDate?: string;
        taxPercentage?: string;
        timezone?: string;
    }
    Index
    cardId?: string
    customerId: string
    idempotencyKey: string

    Required. Square creates the subscription once per key, so a retry with the same key cannot create (and bill) a second one. At most 45 characters.

    locationId?: string

    Ordered list of billing phases. Each phase references an order template that defines the line items billed during that phase.

    planVariationId?: string

    Plan variation ID. Required when phases is omitted.

    priceOverride?: number
    startDate?: string
    taxPercentage?: string
    timezone?: string