Check Stripe webhook configuration
Checks up to100 Stripe webhook endpoints using the provided or saved private key and compares the expected URL after trimming trailing slashes. Reports endpoint readiness and missing required events; wildcard subscriptions satisfy every required event. This does not create or update an endpoint. Requires permission: one of access_account_settings.
curl --request POST \
--url https://api.gratona.com/v1/integrations/stripe/webhook-status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pivateKey": "sk_test_EXAMPLE",
"private_key": "sk_test_EXAMPLE",
"webhook_url": "https://api.gratona.com",
"webhookUrl": "https://api.gratona.com",
"expected_url": "https://api.gratona.com/v1/stripe/webhook"
}
'import requests
url = "https://api.gratona.com/v1/integrations/stripe/webhook-status"
payload = {
"pivateKey": "sk_test_EXAMPLE",
"private_key": "sk_test_EXAMPLE",
"webhook_url": "https://api.gratona.com",
"webhookUrl": "https://api.gratona.com",
"expected_url": "https://api.gratona.com/v1/stripe/webhook"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pivateKey: 'sk_test_EXAMPLE',
private_key: 'sk_test_EXAMPLE',
webhook_url: 'https://api.gratona.com',
webhookUrl: 'https://api.gratona.com',
expected_url: 'https://api.gratona.com/v1/stripe/webhook'
})
};
fetch('https://api.gratona.com/v1/integrations/stripe/webhook-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gratona.com/v1/integrations/stripe/webhook-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pivateKey' => 'sk_test_EXAMPLE',
'private_key' => 'sk_test_EXAMPLE',
'webhook_url' => 'https://api.gratona.com',
'webhookUrl' => 'https://api.gratona.com',
'expected_url' => 'https://api.gratona.com/v1/stripe/webhook'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/integrations/stripe/webhook-status"
payload := strings.NewReader("{\n \"pivateKey\": \"sk_test_EXAMPLE\",\n \"private_key\": \"sk_test_EXAMPLE\",\n \"webhook_url\": \"https://api.gratona.com\",\n \"webhookUrl\": \"https://api.gratona.com\",\n \"expected_url\": \"https://api.gratona.com/v1/stripe/webhook\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gratona.com/v1/integrations/stripe/webhook-status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pivateKey\": \"sk_test_EXAMPLE\",\n \"private_key\": \"sk_test_EXAMPLE\",\n \"webhook_url\": \"https://api.gratona.com\",\n \"webhookUrl\": \"https://api.gratona.com\",\n \"expected_url\": \"https://api.gratona.com/v1/stripe/webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/integrations/stripe/webhook-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pivateKey\": \"sk_test_EXAMPLE\",\n \"private_key\": \"sk_test_EXAMPLE\",\n \"webhook_url\": \"https://api.gratona.com\",\n \"webhookUrl\": \"https://api.gratona.com\",\n \"expected_url\": \"https://api.gratona.com/v1/stripe/webhook\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"code": "ready",
"found": true,
"expected_url": "https://api.gratona.com/v1/stripe/webhook",
"endpoint_id": "we_EXAMPLE",
"endpoint_status": "enabled",
"enabled_events": [
"charge.succeeded"
],
"required_events": [
"charge.succeeded"
],
"missing_events": [
"payment_intent.processing"
],
"has_required_events": true,
"message": "Stripe webhook found and required events are enabled."
}
}{
"message": "Unauthorized",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Body
Validated request fields for this operation.
Legacy misspelled Stripe secret-key field; takes precedence over private_key. Omit to use the saved gateway key.
"sk_test_EXAMPLE"
Alternative Stripe secret-key field.
"sk_test_EXAMPLE"
Preferred expected endpoint/base URL override. The Stripe webhook suffix is appended when absent.
"https://api.gratona.com"
Legacy alias for webhook_url.
"https://api.gratona.com"
Legacy fallback alias for the expected endpoint URL.
"https://api.gratona.com/v1/stripe/webhook"
Response
Operation result.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.gratona.com/v1/integrations/stripe/webhook-status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pivateKey": "sk_test_EXAMPLE",
"private_key": "sk_test_EXAMPLE",
"webhook_url": "https://api.gratona.com",
"webhookUrl": "https://api.gratona.com",
"expected_url": "https://api.gratona.com/v1/stripe/webhook"
}
'import requests
url = "https://api.gratona.com/v1/integrations/stripe/webhook-status"
payload = {
"pivateKey": "sk_test_EXAMPLE",
"private_key": "sk_test_EXAMPLE",
"webhook_url": "https://api.gratona.com",
"webhookUrl": "https://api.gratona.com",
"expected_url": "https://api.gratona.com/v1/stripe/webhook"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pivateKey: 'sk_test_EXAMPLE',
private_key: 'sk_test_EXAMPLE',
webhook_url: 'https://api.gratona.com',
webhookUrl: 'https://api.gratona.com',
expected_url: 'https://api.gratona.com/v1/stripe/webhook'
})
};
fetch('https://api.gratona.com/v1/integrations/stripe/webhook-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gratona.com/v1/integrations/stripe/webhook-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pivateKey' => 'sk_test_EXAMPLE',
'private_key' => 'sk_test_EXAMPLE',
'webhook_url' => 'https://api.gratona.com',
'webhookUrl' => 'https://api.gratona.com',
'expected_url' => 'https://api.gratona.com/v1/stripe/webhook'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/integrations/stripe/webhook-status"
payload := strings.NewReader("{\n \"pivateKey\": \"sk_test_EXAMPLE\",\n \"private_key\": \"sk_test_EXAMPLE\",\n \"webhook_url\": \"https://api.gratona.com\",\n \"webhookUrl\": \"https://api.gratona.com\",\n \"expected_url\": \"https://api.gratona.com/v1/stripe/webhook\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gratona.com/v1/integrations/stripe/webhook-status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pivateKey\": \"sk_test_EXAMPLE\",\n \"private_key\": \"sk_test_EXAMPLE\",\n \"webhook_url\": \"https://api.gratona.com\",\n \"webhookUrl\": \"https://api.gratona.com\",\n \"expected_url\": \"https://api.gratona.com/v1/stripe/webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/integrations/stripe/webhook-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pivateKey\": \"sk_test_EXAMPLE\",\n \"private_key\": \"sk_test_EXAMPLE\",\n \"webhook_url\": \"https://api.gratona.com\",\n \"webhookUrl\": \"https://api.gratona.com\",\n \"expected_url\": \"https://api.gratona.com/v1/stripe/webhook\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"code": "ready",
"found": true,
"expected_url": "https://api.gratona.com/v1/stripe/webhook",
"endpoint_id": "we_EXAMPLE",
"endpoint_status": "enabled",
"enabled_events": [
"charge.succeeded"
],
"required_events": [
"charge.succeeded"
],
"missing_events": [
"payment_intent.processing"
],
"has_required_events": true,
"message": "Stripe webhook found and required events are enabled."
}
}{
"message": "Unauthorized",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}