Stripe billing webhook
Receive Stripe billing events for subscriptions, invoices, credits, and payment flows. Verifies the stripe-signature header with STRIPE_WEBHOOK_SECRET. Preserve the raw body.
curl -X POST "https://api.talkturo.com/api/billing/webhook" \
-H "Content-Type: application/json" \
-H "stripe-signature: example_string" \
-H "stripe-signature: YOUR_API_KEY" \
-d '{
"id": "example_string",
"type": "example_string",
"data": {}
}'
import requests
import json
url = "https://api.talkturo.com/api/billing/webhook"
headers = {
"Content-Type": "application/json",
"stripe-signature": "YOUR_API_KEY"
}
data = {
"id": "example_string",
"type": "example_string",
"data": {}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.talkturo.com/api/billing/webhook", {
method: "POST",
headers: {
"Content-Type": "application/json",
"stripe-signature": "YOUR_API_KEY"
},
body: JSON.stringify({
"id": "example_string",
"type": "example_string",
"data": {}
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"id": "example_string",
"type": "example_string",
"data": {}
}`)
req, err := http.NewRequest("POST", "https://api.talkturo.com/api/billing/webhook", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("stripe-signature", "example_string")
req.Header.Set("stripe-signature", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.talkturo.com/api/billing/webhook')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['stripe-signature'] = 'example_string'
request['stripe-signature'] = 'YOUR_API_KEY'
request.body = '{
"id": "example_string",
"type": "example_string",
"data": {}
}'
response = http.request(request)
puts response.body
{
"received": true
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
/billing/webhook
Target server for requests. Edit to use your own host.
Stripe webhook signature verified with STRIPE_WEBHOOK_SECRET. The raw request body must be preserved for verification.
The media type of the request body
Stripe webhook signature header
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Stripe webhook signature verified with STRIPE_WEBHOOK_SECRET. The raw request body must be preserved for verification.
Headers
Stripe webhook signature header