Mayson Monorepo Documentation
    Preparing search index...
    Index

    Constructors

    Properties

    signature: Stripe.Signature

    Methods

    • Constructs and verifies the signature of an Event from the provided details.

      Parameters

      • payload: string | Buffer<ArrayBufferLike>

        Raw text body payload received from Stripe.

      • header: string | string[] | Buffer<ArrayBufferLike>

        Value of the stripe-signature header from Stripe. Typically a string.

        Note that this is typed to accept an array of strings so that it works seamlessly with express's types, but will throw if an array is passed in practice since express should never return this header as an array, only a string.

      • secret: string

        Your Webhook Signing Secret for this endpoint (e.g., 'whsec_...'). You can get this in your dashboard.

      • Optionaltolerance: number

        Seconds of tolerance on timestamps.

      • OptionalcryptoProvider: CryptoProvider

        Optional CryptoProvider to use for computing HMAC signatures.

      • OptionalreceivedAt: number

        Optional: timestamp to use when checking signature validity. Defaults to Date.now().

      Returns Stripe.Event

      Stripe.errors.StripeSignatureVerificationError

    • Asynchronously constructs and verifies the signature of an Event from the provided details.

      Parameters

      • payload: string | Buffer<ArrayBufferLike>

        Raw text body payload received from Stripe.

      • header: string | string[] | Buffer<ArrayBufferLike>

        Value of the stripe-signature header from Stripe. Typically a string.

        Note that this is typed to accept an array of strings so that it works seamlessly with express's types, but will throw if an array is passed in practice since express should never return this header as an array, only a string.

      • secret: string

        Your Webhook Signing Secret for this endpoint (e.g., 'whsec_...'). You can get this in your dashboard.

      • Optionaltolerance: number

        Seconds of tolerance on timestamps.

      • OptionalcryptoProvider: CryptoProvider

        Optional CryptoProvider to use for computing HMAC signatures.

      • OptionalreceivedAt: number

        Optional: timestamp to use when checking signature validity. Defaults to Date.now().

      Returns Promise<Stripe.Event>

      Stripe.errors.StripeSignatureVerificationError

    • Generates a header to be used for webhook mocking

      Parameters

      Returns Promise<string>