Skip to main content
POST
https://apis.hopnow.io
/
v1
/
customers
/
{customer_id}
/
webhook-endpoints
Create Webhook Endpoint
curl --request POST \
  --url https://apis.hopnow.io/v1/customers/{customer_id}/webhook-endpoints \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "events": [
    {}
  ],
  "description": "<string>"
}
'
{
  "id": "<string>",
  "object": "<string>",
  "url": "<string>",
  "events": [
    {}
  ],
  "is_active": true,
  "description": "<string>",
  "secret": "<string>",
  "warning": "<string>",
  "created": "<string>",
  "last_used_at": "<string>"
}
The response includes a signing secret that you must store securely. This secret is used to verify webhook authenticity and is only shown once.

Path Parameters

customer_id
string
required
The customer’s external ID (starts with cus_)

Request Body

url
string
required
The HTTPS URL where webhook events will be sent
events
array
required
Array of event types to subscribe to (minimum 1 event)
description
string
Optional description for the webhook endpoint (max 500 characters)

Response

id
string
Webhook endpoint identifier (starts with whep_)
object
string
Always returns "webhook_endpoint"
url
string
The webhook URL
events
array
Array of subscribed event types
is_active
boolean
Whether the endpoint is active
description
string
The webhook description
secret
string
Webhook signing secret - Store this securely! Only shown once.
warning
string
Security warning about storing the secret
created
string
ISO 8601 timestamp when created
last_used_at
string
When the endpoint was last used

Response Example

{
  "id": "whep_1234567890abcdef",
  "object": "webhook_endpoint",
  "url": "https://api.mycompany.com/webhooks/hopnow",
  "events": ["payin.completed", "payout.completed", "account.created"],
  "is_active": true,
  "description": "Production webhook for payment notifications",
  "secret": "whsec_1234567890abcdef1234567890abcdef",
  "warning": "Store this secret securely. It will not be shown again.",
  "created": "2024-01-01T00:00:00Z",
  "last_used_at": null
}