Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithListen

Method
📦 CommunityToolkit.Aspire.Hosting.Stripe v13.6.1
func (StripeResource) WithListen(
forwardTo ResourceWithEndpoints,
options ...*WithListenOptions,
) StripeResource

Signature

methodWithListenbuilder
Configures the Stripe CLI to listen for webhooks and forward them to the specified URL expression.
WithListen(
forwardTo ResourceWithEndpoints,
options ...*WithListenOptions,
) StripeResource
forwardToResourceWithEndpointsThe resource to forward webhooks to.
options...*WithListenOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithListenOptions argument.

WebhookPath*stringThe path to the webhook endpoint.
Events[]stringOptional collection of specific webhook events to listen for (e.g., ["payment_intent.created", "charge.succeeded"]). If not specified, all events are forwarded.
StripeResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: