Verify and atomically apply an idempotent Stripe prepaid payment event
POST
/
api
/
v1
/
billing
/
webhooks
/
stripe
Verify and atomically apply an idempotent Stripe prepaid payment event
curl --request POST \
--url http://127.0.0.1:18000/api/v1/billing/webhooks/stripe \
--header 'Content-Type: application/json' \
--header 'Stripe-Signature: <stripe-signature>' \
--data '{}'import requests
url = "http://127.0.0.1:18000/api/v1/billing/webhooks/stripe"
payload = {}
headers = {
"Stripe-Signature": "<stripe-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Stripe-Signature': '<stripe-signature>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('http://127.0.0.1:18000/api/v1/billing/webhooks/stripe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/billing/webhooks/stripe"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Stripe-Signature", "<stripe-signature>")
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))
}{
"credit_applied": true,
"received": true,
"status": "ignored"
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}Headers
Stripe webhook HMAC signature; the request is unauthenticated by bearer token and grants balance only after verification.
Body
application/json
The body is of type object.
⌘I
Verify and atomically apply an idempotent Stripe prepaid payment event
curl --request POST \
--url http://127.0.0.1:18000/api/v1/billing/webhooks/stripe \
--header 'Content-Type: application/json' \
--header 'Stripe-Signature: <stripe-signature>' \
--data '{}'import requests
url = "http://127.0.0.1:18000/api/v1/billing/webhooks/stripe"
payload = {}
headers = {
"Stripe-Signature": "<stripe-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Stripe-Signature': '<stripe-signature>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('http://127.0.0.1:18000/api/v1/billing/webhooks/stripe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/billing/webhooks/stripe"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Stripe-Signature", "<stripe-signature>")
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))
}{
"credit_applied": true,
"received": true,
"status": "ignored"
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}