Set the app's ledger-callback endpoint
curl --request POST \
--url https://api.pid.peridotvault.com/v1/apps/{id}/webhook \
--header 'Content-Type: application/json' \
--cookie pid_access= \
--data '
{
"url": "https://live2dev.com/peridot/webhook"
}
'const options = {
method: 'POST',
headers: {cookie: 'pid_access=', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://live2dev.com/peridot/webhook'})
};
fetch('https://api.pid.peridotvault.com/v1/apps/{id}/webhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pid.peridotvault.com/v1/apps/{id}/webhook"
payload = { "url": "https://live2dev.com/peridot/webhook" }
headers = {
"cookie": "pid_access=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pid.peridotvault.com/v1/apps/{id}/webhook"
payload := strings.NewReader("{\n \"url\": \"https://live2dev.com/peridot/webhook\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "pid_access=")
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))
}{
"url": "<string>",
"secret": "<string>"
}{
"statusCode": 400,
"message": [
"handle must be 3-20 chars: lowercase letters, numbers, underscore"
]
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"message": "No Identity found"
}apps
Set the app's ledger-callback endpoint
PeridotID POSTs signed ledger events here (e.g. fiat.transfer.posted
when funds land on this app’s escrow account). Returns a pidwh_… HMAC
signing secret once; every callback carries
X-Pid-Signature: sha256=<hex> over the raw body and X-Pid-Event.
https required (http allowed for localhost). Owners only.
POST
/
apps
/
{id}
/
webhook
Set the app's ledger-callback endpoint
curl --request POST \
--url https://api.pid.peridotvault.com/v1/apps/{id}/webhook \
--header 'Content-Type: application/json' \
--cookie pid_access= \
--data '
{
"url": "https://live2dev.com/peridot/webhook"
}
'const options = {
method: 'POST',
headers: {cookie: 'pid_access=', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://live2dev.com/peridot/webhook'})
};
fetch('https://api.pid.peridotvault.com/v1/apps/{id}/webhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pid.peridotvault.com/v1/apps/{id}/webhook"
payload = { "url": "https://live2dev.com/peridot/webhook" }
headers = {
"cookie": "pid_access=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pid.peridotvault.com/v1/apps/{id}/webhook"
payload := strings.NewReader("{\n \"url\": \"https://live2dev.com/peridot/webhook\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "pid_access=")
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))
}{
"url": "<string>",
"secret": "<string>"
}{
"statusCode": 400,
"message": [
"handle must be 3-20 chars: lowercase letters, numbers, underscore"
]
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"message": "No Identity found"
}Authorizations
JWT access token set by /auth/google/callback or /auth/refresh
Path Parameters
Body
application/json
Example:
"https://live2dev.com/peridot/webhook"