Listar webhooks
curl --request GET \
--url https://api.pagstack.com/v1/webhook-endpoints \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pagstack.com/v1/webhook-endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pagstack.com/v1/webhook-endpoints"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"id": "<string>",
"object": "webhook_endpoint",
"livemode": true,
"url": "<string>",
"events": [
"transaction.paid"
],
"status": "enabled",
"previous_secret_expires_at": "<string>",
"created_at": "<string>",
"secret": "<string>"
}
],
"has_more": true
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Webhooks
Listar webhooks
Lista os webhooks da conta.
Listar webhooks
curl --request GET \
--url https://api.pagstack.com/v1/webhook-endpoints \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pagstack.com/v1/webhook-endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pagstack.com/v1/webhook-endpoints"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"id": "<string>",
"object": "webhook_endpoint",
"livemode": true,
"url": "<string>",
"events": [
"transaction.paid"
],
"status": "enabled",
"previous_secret_expires_at": "<string>",
"created_at": "<string>",
"secret": "<string>"
}
],
"has_more": true
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}