Get All Webhooks
Endpoint for searching for a Webhook.
info
Please be aware that this endpoint requires a Manage Webhooks API Key.
GET /api/v1/groups/{group_id}/revere_pay/{linked_account_id}/webhooks
Response
Code | Description |
---|---|
200 | Success |
400 | Bad Request / Validation error |
500 | Internal Error |
Example Usage
- JavaScript
- Python
- Go
webhook.js
var headers = new Headers();
headers.append('Authorization', 'API_KEY');
var requestOptions = {
method: 'GET',
headers: headers,
redirect: 'follow'
};
const group_id = '';
const linked_account_id = '';
const url = `https://api.reverepayments.dev/api/v1/groups/${group_id}/revere_pay/${linked_account_id}/webhooks`;
fetch(url, requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));
webhook.py
import requests
group_id = ""
linked_account_id = ""
url = "https://api.reverepayments.dev/api/v1/groups/"+group_id+"/revere_pay/"+linked_account_id+"/webhooks"
headers = {
'Authorization': 'API_KEY'
}
response = requests.request("GET", url, headers=headers)
print(response.text)
webhook.go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
const group_id = ""
const linked_account_id = ""
url := "https://api.reverepayments.dev/api/v1/groups/" + group_id + "/revere_pay/" + linked_account_id + "/webhooks"
client := &http.Client{}
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "API_KEY")
res, _ := client.Do(req)
defer res.Body.Close()
bytes, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err.Error())
return
}
fmt.Println(string(bytes))
}
Example Success Response
{
"data": [
{
"id": "62589c1a-07c7-4410-a2dc-8ed2f23d6b49",
"group_id": "3322d0a9-5578-4072-a67b-eb48de1f52c7",
"url": "https://webhook.site/ed874d91-5204-4a41-aa9b-224239adc7e9",
"trigger_on": ["transaction.initiate", "transaction.decline", "transaction.settlement"],
"encoding_type": "json",
"request_type": "basic",
"public_key": "BEGIN RSA PUBLIC KEY...",
"created_at": "2024-07-28T15:11:16.975339432Z",
"updated_at": "2024-07-28T15:11:16.975339432Z"
}
]
}