Creates a PENDING_VERIFICATION webhook subscription for a public HTTPS callback URL. Each API user may have only one non-deleted subscription for a given targetUrl.
Headers
-
Public API key issued from the Lumepay API key management flow.
-
API secret paired with the public API key.
POST
/api/v1/webhooks/subscriptions
curl \
--request POST 'https://api.staging.lumepay.com/api/v1/webhooks/subscriptions' \
--header "Content-Type: application/json" \
--header "X-API-KEY: string" \
--header "X-API-SECRET: string" \
--data '{"name":"Ops webhook alerts","targetUrl":"https://example.com/webhooks","eventTypes":["deposit.completed"]}'
Request examples
# Headers
X-API-KEY: string
X-API-SECRET: string
# Payload
{
"name": "Ops webhook alerts",
"targetUrl": "https://example.com/webhooks",
"eventTypes": [
"deposit.completed"
]
}
Response examples (201)
{
"id": "whsub_5e737a5abaee46568bd8d530b9b3521a",
"name": "Ops webhook alerts",
"targetUrl": "https://example.com/webhooks",
"status": "PENDING_VERIFICATION",
"events": [
{
"eventType": "deposit.completed",
"resourceType": "deposit",
"event": "completed",
"displayName": "Deposit completed",
"description": "Deposit has completed."
}
],
"verifiedAt": "2026-06-12T15:03:23Z",
"createdAt": "2026-06-12T15:01:00Z",
"updatedAt": "2026-06-12T15:03:23Z"
}
Response examples (400)
{
"httpStatus": 400,
"requestId": "req_01HY0000000000000000000000",
"message": "Request validation failed",
"code": 400,
"timestamp": "2026-01-01T00:00:00Z",
"errors": []
}
Response examples (429)
{
"error": "rate_limit_exceeded",
"message": "API rate limit exceeded"
}
Response examples (403)
{
"httpStatus": 403,
"requestId": "req_01HY0000000000000000000000",
"message": "Authenticated API key is not allowed to perform this action",
"code": 403,
"timestamp": "2026-01-01T00:00:00Z",
"errors": []
}
Response examples (500)
{
"httpStatus": 500,
"requestId": "req_01HY0000000000000000000000",
"message": "Unexpected server error",
"code": 500,
"timestamp": "2026-01-01T00:00:00Z",
"errors": []
}
Response examples (401)
{
"httpStatus": 401,
"requestId": "req_01HY0000000000000000000000",
"message": "API key authentication failed",
"code": 401,
"timestamp": "2026-01-01T00:00:00Z",
"errors": []
}