Create a webhook endpoint
POST
/v1/webhook-endpoints
const endpoint = await gp.webhookEndpoints.create({ url: 'https://merchant.example/webhooks/gryphem', enabled_events: ['payment.confirmed', 'payment.review_required', 'payment.reorged'],});// endpoint.secret (whsec_…) is shown once — store it in your secret managerendpoint = gp.webhook_endpoints.create( url="https://merchant.example/webhooks/gryphem", enabled_events=["payment.confirmed", "payment.review_required", "payment.reorged"],)# endpoint["secret"] is shown onceendpoint, err := client.WebhookEndpoints.Create(ctx, &gryphempay.WebhookEndpointCreateParams{ URL: "https://merchant.example/webhooks/gryphem", EnabledEvents: []string{"payment.confirmed", "payment.review_required", "payment.reorged"},})// endpoint.Secret is shown onceThe whsec_… signing secret is returned once. Destinations are SSRF-checked at delivery time and redirects are never followed. Honors Idempotency-Key (replays return the original response for 24 h).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Gryphem-Organization
string
Active organization for dashboard sessions. Ignored for API keys (the key determines the organization).
Gryphem-Environment
string
test (default) or live for dashboard sessions. API keys determine the environment.
Idempotency-Key
string
Unique key per logical create operation (max 255 chars). Replays return the original response; reuse with a different body returns idempotency_error.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
url
required
string format: uri
description
string
enabled_events
required
Array<string>
store_id
string
Example generated
{ "url": "https://example.com", "description": "example", "enabled_events": [ "example" ], "store_id": "example"}Responses
Section titled “Responses”Created; signing secret is shown once.
Media typeapplication/json
object
id
required
string
object
required
string
livemode
required
boolean
url
required
string
description
required
string
enabled_events
required
Array
store_id
required
string | null
status
required
string
secret_last4
required
string | null
secret_rotated_at
required
string | null format: date-time
created_at
required
string format: date-time
updated_at
required
string format: date-time
secret
required
Whsec_… signing secret, shown once.
string
Example
{ "object": "webhook_endpoint", "enabled_events": [ "payment_intent.created" ], "status": "enabled"}Missing or invalid credentials.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{ "error": { "type": "invalid_request_error" }}Authenticated but not permitted.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{ "error": { "type": "invalid_request_error" }}Validation failed.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{ "error": { "type": "invalid_request_error" }}Too many requests. See Retry-After.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{ "error": { "type": "invalid_request_error" }}Headers
Section titled “Headers”Retry-After
integer