Webhooks: Update
This request allows you to update the information of a webhook that has already been created by specifying the app token, secret, (merchant ID), store ID, and webhook ID.
Use this request to resume processing of webhooks that have been stopped due to notification failure or other reasons.
When retrieving webhook information specifying a store, merchants/{merchantId}
can be omitted.
Request
PATCH https://api.univapay.com/merchants/{merchantId}/stores/{storeId}/webhooks/{wenbhookId}
Parameters:
Parameters | |
active | boolean Webhook status, true or false . |
url | string URL of the webhook notification destination. |
triggers | string A list of events to trigger this webhook. |
auth_token | string Optional authorization header value for the webhook request. |
Headers:
Content-Type: application/json
Authorization: Bearer {secret}.{jwt}
Body:
curl --request PATCH \ --url https://api.univapay.com/stores/af857264-180c-11e7-9be2-276aea4fed28/webhooks/0fe1e42a-1845-11e7-9b1f-d3bd0c055a99 \
--header 'Authorization: Bearer {secret}.{jwt}' \
--header 'content-type: application/json' \
--data '{"active": "true"}'
Response
Code: 200
Headers:
Content-Type: application/json
Body:
{
"id": "0fe1e42a-1845-11e7-9b1f-d3bd0c055a99",
"merchant_id": "11ecda53-ed43-3s4-a6da-0b40bd376d41",
"store_id": "af857264-180c-11e7-9be2-276aea4fed28",
"triggers": [
"charge_updated",
"charge_finished",
"subscription_created",
"token_created"
],
"url": "https://docs.univapay.com/References/reference/",
"auth_token": "Bearer eyJhbGciqwdcirE1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2NTY1NjY5NDl9.HRPDOGYj_jz7amfGu-s4pjmAvg7p9nxEf3TlefQDSiE",
"active": true,
"is_integration": true,
"created_on": "2022-06-30T05:29:10.085639Z",
"updated_on": "2023-05-01T05:08:53.781923Z"
}