@bates-solutions/stripe API Reference - v2.2.1
    Preparing search index...

    Class SetupIntentsService

    SetupIntents service wrapping Stripe SetupIntents: save a payment method for later without charging it now.

    Typical flow: create a SetupIntent on the server, pass its client_secret to Stripe.js to collect and confirm the card, then charge the saved payment method off-session later with payments.create.

    const intent = await stripe.setupIntents.create({ customerId: 'cus_123' });
    return { clientSecret: intent.client_secret };
    Index
    • Cancel a SetupIntent that hasn't succeeded.

      Parameters

      • setupIntentId: string
      • Optionaloptions: { idempotencyKey?: string; reason?: CancellationReason }

      Returns Promise<SetupIntent>

      When setupIntentId is missing

    • Confirm a SetupIntent on the server (usually Stripe.js confirms it in the browser instead).

      Parameters

      • setupIntentId: string
      • Optionaloptions: { idempotencyKey?: string; paymentMethod?: string; returnUrl?: string }

      Returns Promise<SetupIntent>

      When setupIntentId is missing