Skip to main content
GET
/
v1
/
webhooks
/
endpoints
/
{id}
Go (SDK)
package main

import(
	"context"
	"os"
	polargo "github.com/polarsource/polar-go"
	"log"
)

func main() {
    ctx := context.Background()

    s := polargo.New(
        polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")),
    )

    res, err := s.Webhooks.GetWebhookEndpoint(ctx, "<value>")
    if err != nil {
        log.Fatal(err)
    }
    if res.WebhookEndpoint != nil {
        // handle response
    }
}
{
  "created_at": "2023-11-07T05:31:56Z",
  "modified_at": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "url": "https://webhook.site/cb791d80-f26e-4f8c-be88-6e56054192b0",
  "format": "raw",
  "secret": "polar_whs_ovyN6cPrTv56AApvzCaJno08SSmGJmgbWilb33N2JuK",
  "organization_id": "<string>",
  "events": [
    "checkout.created"
  ],
  "enabled": true
}

Authorizations

Authorization
string
header
required

Path Parameters

id
string<uuid4>
required

Response

created_at
string<date-time>
required
modified_at
string<date-time> | null
required
id
string<uuid4>
required
url
string<uri>
required
Required string length: 1 - 2083
Examples:
format
enum<string>
required
Available options:
raw,
discord,
slack
secret
string
required
Examples:
organization_id
string<uuid4>
required
events
enum<string>[]
required
enabled
boolean
required