Skip to content

Create or update webhook endpoints

Request

Create a new webhook endpoint or update an existing one. If an endpoint with the same URL already exists, it will be updated with the new event subscriptions.

Security
bearerAuth or basicAuth
Bodyapplication/jsonrequired
endpoint_urlstring, (uri)^https://required

The HTTPS URL where webhook events will be sent. Must use HTTPS protocol.

Example:"https://example.com/webhooks/resolve"
eventsobject(WebhookEventSubscriptions)required

Object containing boolean flags for each available webhook event topic. Set to true to subscribe to that event, or false to unsubscribe.

curl -i -X POST \
  https://docs.resolvepay.com/_mock/partners-api/openapi/webhooks \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "endpoint_url": "https://example.com/webhooks/resolve",
    "events": {
      "invoice.created": true,
      "invoice.balance_updated": true,
      "customer.created": true,
      "customer.credit_decision_created": true
    }
  }'

Responses

Successful response with webhook endpoint subscriptions

Bodyapplication/json
Array [
idstring

Unique identifier for the webhook endpoint

Example:"whe_abc123def456"
merchant_idstring

The partner ID associated with this webhook endpoint

Example:"mer_xyz789"
endpoint_urlstring, (uri)

The HTTPS URL where webhook events will be sent

Example:"https://example.com/webhooks/resolve"
topicobject

The event topic this endpoint is subscribed to

created_atstring, (date-time)

When this webhook endpoint subscription was created

Example:"2021-05-20T09:23:53+00:00"
updated_atstring, (date-time)

When this webhook endpoint subscription was last updated

Example:"2021-05-20T09:23:53+00:00"
]
Response
[ { "id": "whe_abc123def456", "merchant_id": "mer_xyz789", "endpoint_url": "https://example.com/webhooks/resolve", "topic": {}, "created_at": "2021-05-20T09:23:53+00:00", "updated_at": "2021-05-20T09:23:53+00:00" }, { "id": "whe_def456ghi789", "merchant_id": "mer_xyz789", "endpoint_url": "https://example.com/webhooks/resolve", "topic": {}, "created_at": "2021-05-20T09:23:53+00:00", "updated_at": "2021-05-20T09:23:53+00:00" }, { "id": "whe_ghi789jkl012", "merchant_id": "mer_xyz789", "endpoint_url": "https://example.com/webhooks/resolve", "topic": {}, "created_at": "2021-05-20T09:23:53+00:00", "updated_at": "2021-05-20T09:23:53+00:00" } ]