replace
operation. Pass a json_patch
object with replace
operation and path
, which is /url
for a URL or /event_types
for events. The value
is either the URL or a list of events.username:password
Authorization: Basic *****************
[
{
"op": "replace",
"path": "/event_types",
"value": [
{
"name": "CUSTOMER.DISPUTE.CREATED"
},
{
"name": "CATALOG.PRODUCT.CREATED"
},
{
"name": "BILLING.PLAN.PRICING-CHANGE.ACTIVATED"
},
{
"name": "PAYMENT.PAYOUTSBATCH.SUCCESS"
},
{
"name": "BILLING.PLAN.CREATED"
}
]
}
]
curl --location -g --request PATCH 'https://api-m.sandbox.paypal.com/v1/notifications/webhooks/{{webhook_id}}' \
--header 'PayPal-Request-Id: ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '[
{
"op": "replace",
"path": "/event_types",
"value": [
{
"name": "CUSTOMER.DISPUTE.CREATED"
},
{
"name": "CATALOG.PRODUCT.CREATED"
},
{
"name": "BILLING.PLAN.PRICING-CHANGE.ACTIVATED"
},
{
"name": "PAYMENT.PAYOUTSBATCH.SUCCESS"
},
{
"name": "BILLING.PLAN.CREATED"
}
]
}
]'
{
"id": "58J42045AF4813205",
"url": "https://example.com/example_webhook_2",
"event_types": [
{
"name": "PAYMENT.SALE.REFUNDED",
"description": "A merchant refunds a sale."
}
],
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks/58J42045AF4813205",
"rel": "self",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks/58J42045AF4813205",
"rel": "update",
"method": "PATCH"
},
{
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks/58J42045AF4813205",
"rel": "delete",
"method": "DELETE"
}
]
}