Skip to main content
PUT
/
v1
/
aggregators
/
{raast-aggregator-id}
/
webhooks
/
{webhook-id}
Update Webhook
curl --request PUT \
  --url https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/webhooks/{webhook-id} \
  --header 'Content-Type: application/json' \
  --header 'X-SFPY-AGGREGATOR-SECRET-KEY: <api-key>' \
  --data '
{
  "url": "https://github.com/HasCold",
  "description": "this is testing url endpoint",
  "event_types": [
    "payment.created",
    "payment.refunded"
  ],
  "enabled": true
}
'
{
  "api_version": "v1",
  "data": {
    "endpoint": {
      "token": "wh_f52d84b4-a140-4a3a-b707-80644232e926",
      "aggregator_id": "agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e",
      "url": "https://github.com/HasCold",
      "description": "this is the testing url",
      "enabled": true,
      "event_filter_json": "[\"payment.created\",\"payment.authorized\"]",
      "created_at": "2025-12-02T12:48:35Z",
      "updated_at": "2025-12-02T12:53:10.338063178Z",
      "secret": "9sU3KVM5iQYZsxt40st1nkJsvbyuLnquB3Re1Q7k08w=",
      "secret_version": 1,
      "secret_rotated_at": "2025-12-02T12:48:35Z"
    }
  }
}

Authorizations

X-SFPY-AGGREGATOR-SECRET-KEY
string
header
required

Path Parameters

raast-aggregator-id
string
required

The unique identifier for the aggregator

Example:

"agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e"

webhook-id
string
required

The unique identifier for the webhook

Example:

"wh_be2d4ee4-96b0-4104-92b2-95237fd3aa16"

Body

application/json

Request to update a webhook endpoint

Parameters for the webhook modification

url
string

The URL where webhook events will be sent

Example:

"https://github.com/HasCold"

description
string

Optional description for the webhook endpoint

Example:

"this is testing url endpoint"

event_types
string[]

List of event types to subscribe to

Example:
["payment.created", "payment.refunded"]
enabled
boolean
Example:

true

Response

This response contains details of a Webhook

Standard response structure for successful operations

api_version
string

The current version of the API spec

Example:

"v1"

data
object

Contains the response data