Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 3.46 KB

File metadata and controls

60 lines (42 loc) · 3.46 KB

Webhooks

Overview

Webhook endpoints for external service integrations

Available Operations

HandleStripeWebhook

Receives and processes Stripe webhook events for subscription management. This endpoint is called by Stripe and uses webhook signature verification instead of API authentication.

Example Usage

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
    }
}

Parameters

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.

Response

*operations.HandleStripeWebhookResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.SDKError 4XX, 5XX */*