Webhook endpoints for external service integrations
- HandleStripeWebhook - Handle Stripe webhook
Receives and processes Stripe webhook events for subscription management. This endpoint is called by Stripe and uses webhook signature verification instead of API authentication.
package main
import(
"context"
speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := speakeasyclientsdkgo.New()
res, err := s.Webhooks.HandleStripeWebhook(ctx, operations.HandleStripeWebhookRequestBody{})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.HandleStripeWebhookRequestBody | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.HandleStripeWebhookResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |