curl --request PATCH \
--url https://sandbox.payfi.global/v1/webhooks/{webhookId} \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <api-key>' \
--header 'X-PayFi-Api-Key: <api-key>' \
--header 'X-PayFi-Nonce: <api-key>' \
--header 'X-PayFi-Signature: <api-key>' \
--data '
{
"eventTypes": [
"operation.manual_review.completed"
],
"rotateSecret": true
}
'
{
"webhookId": "whe_example",
"name": "Acme endpoint",
"url": "https://acme.example/payfi/webhooks",
"status": "ACTIVE",
"eventTypes": [
"operation.manual_review.completed"
],
"secretPreview": "whsec_te...wxyz",
"secret": "whsec_test_returned_once_on_rotation",
"createdAt": "2026-05-20T12:00:00.000Z",
"updatedAt": "2026-05-20T12:30:00.000Z"
}{
"error": {
"code": "INVALID_REQUEST",
"message": "The request payload is invalid."
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication failed."
}
}Webhooks
Update webhook endpoint
Updates webhook endpoint configuration. A new secret is returned only when rotateSecret is true.
PATCH
/
v1
/
webhooks
/
{webhookId}
curl --request PATCH \
--url https://sandbox.payfi.global/v1/webhooks/{webhookId} \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <api-key>' \
--header 'X-PayFi-Api-Key: <api-key>' \
--header 'X-PayFi-Nonce: <api-key>' \
--header 'X-PayFi-Signature: <api-key>' \
--data '
{
"eventTypes": [
"operation.manual_review.completed"
],
"rotateSecret": true
}
'
{
"webhookId": "whe_example",
"name": "Acme endpoint",
"url": "https://acme.example/payfi/webhooks",
"status": "ACTIVE",
"eventTypes": [
"operation.manual_review.completed"
],
"secretPreview": "whsec_te...wxyz",
"secret": "whsec_test_returned_once_on_rotation",
"createdAt": "2026-05-20T12:00:00.000Z",
"updatedAt": "2026-05-20T12:30:00.000Z"
}{
"error": {
"code": "INVALID_REQUEST",
"message": "The request payload is invalid."
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication failed."
}
}Authorizations
Path Parameters
Webhook endpoint ID.
Body
application/json
Webhook endpoint update payload.
Response
Webhook endpoint updated.
Example:
"whe_example"
Example:
"Acme endpoint"
Example:
"https://acme.example/payfi/webhooks"
Example:
"ACTIVE"
Example:
["operation.analysis.completed"]
Example:
"whsec_te...abcd"
Example:
"whsec_test_returned_once"
Example:
"2026-05-20T12:00:00.000Z"
Example:
"2026-05-20T12:00:00.000Z"