PayFanout API reference
    Preparing search index...

    Interface CreateNativeSubscriptionInput

    Creates a subscription the PSP itself bills — server-only, against an already-vaulted instrument (a stored token or mandate; card capture still happens exclusively on PSP-hosted surfaces). The cadence is exactly one of interval (+ optional intervalCount) or schedule; adapters reject a schedule their PSP cannot express faithfully rather than approximating it.

    interface CreateNativeSubscriptionInput {
        amount: number;
        currency: string;
        idempotencyKey: string;
        interval?: "day" | "week" | "month" | "year";
        intervalCount?: number;
        merchantRefNum?: string;
        metadata?: Record<string, string>;
        planId?: string;
        pspCustomerId?: string;
        savedPaymentMethodToken: string;
        schedule?: string;
        startAt?: string;
    }
    Index
    amount: number

    Amount of each installment. Integer minor units.

    currency: string
    idempotencyKey: string
    interval?: "day" | "week" | "month" | "year"

    Simple cadence unit. Exactly one of interval or schedule is required.

    intervalCount?: number

    e.g. every 3 months -> interval "month", intervalCount 3. Default 1.

    merchantRefNum?: string

    Merchant reference, where the PSP has a dedicated field for one.

    metadata?: Record<string, string>
    planId?: string

    PSP plan/price to bill from, where the PSP models one (adapters document it).

    pspCustomerId?: string

    PSP customer the subscription belongs to — required by some PSPs (adapters document it).

    savedPaymentMethodToken: string

    Vault token / mandate the PSP charges each installment against.

    schedule?: string

    RFC 5545 RRULE for richer cadences, where the PSP accepts one.

    startAt?: string

    ISO 8601 instant billing starts; the PSP's own "now" when omitted.