ask-and-trust - v1.0.0
    Preparing search index...
    • Creates a payment intent with Stripe

      Parameters

      • amount: number

        Amount in cents

      • currency: string

        Currency code (e.g., 'eur')

      • description: string

        Description of the payment

      • surveyCount: number

        Number of surveys that will be added to the user's quota

      • userId: number

        ID of the user making the payment

      Returns Promise<string>

      The client secret for the payment intent

      Error if payment creation fails

      const payment = await createPaymentIntent(1000, 'eur', 'Pack 50 enquêtes', 50, 1);