encore-go-webhook
Installation
SKILL.md
Encore Go Webhook Endpoints
Instructions
Use //encore:api raw to receive inbound webhooks from third-party services. Raw endpoints give you direct access to http.ResponseWriter and *http.Request, which you need for signature verification (the verification typically requires the unparsed raw body).
1. Define the endpoint with //encore:api raw
package webhooks
import (
"io"
"net/http"
)
//encore:api public raw path=/webhooks/stripe method=POST
func StripeWebhook(w http.ResponseWriter, req *http.Request) {
sig := req.Header.Get("Stripe-Signature")