Configure outbound webhook
curl --request POST \
--url https://payments.sandbox.lerian.net/v1/admin/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"callbackUrl": "<string>",
"enabledEvents": [
"<string>"
],
"secret": "<string>",
"active": true
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://payments.sandbox.lerian.net/v1/admin/webhooks"
payload := strings.NewReader("{\n \"callbackUrl\": \"<string>\",\n \"enabledEvents\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"active\": true\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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
callbackUrl: '<string>',
enabledEvents: ['<string>'],
secret: '<string>',
active: true
})
};
fetch('https://payments.sandbox.lerian.net/v1/admin/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://payments.sandbox.lerian.net/v1/admin/webhooks"
payload = {
"callbackUrl": "<string>",
"enabledEvents": ["<string>"],
"secret": "<string>",
"active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"active": true,
"callbackUrl": "<string>",
"createdAt": "<string>",
"enabledEvents": [
"<string>"
],
"id": "<string>",
"secret": "[REDACTED]",
"updatedAt": "<string>"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}"<string>"{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Configure outbound webhook
Registers or updates the callback URL for receiving status change notifications. One configuration per tenant.
POST
/
v1
/
admin
/
webhooks
Configure outbound webhook
curl --request POST \
--url https://payments.sandbox.lerian.net/v1/admin/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"callbackUrl": "<string>",
"enabledEvents": [
"<string>"
],
"secret": "<string>",
"active": true
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://payments.sandbox.lerian.net/v1/admin/webhooks"
payload := strings.NewReader("{\n \"callbackUrl\": \"<string>\",\n \"enabledEvents\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"active\": true\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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
callbackUrl: '<string>',
enabledEvents: ['<string>'],
secret: '<string>',
active: true
})
};
fetch('https://payments.sandbox.lerian.net/v1/admin/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://payments.sandbox.lerian.net/v1/admin/webhooks"
payload = {
"callbackUrl": "<string>",
"enabledEvents": ["<string>"],
"secret": "<string>",
"active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"active": true,
"callbackUrl": "<string>",
"createdAt": "<string>",
"enabledEvents": [
"<string>"
],
"id": "<string>",
"secret": "[REDACTED]",
"updatedAt": "<string>"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}"<string>"{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Authorizations
JWT bearer token issued by the identity provider.
Headers
Tenant organization ID. Accepted but ignored: the tenant is determined by the credentials you authenticate with, so sending this header, or sending a different value in it, changes nothing.
Client-supplied idempotency key. Required in practice even though the schema marks it optional: a request that omits this header is refused with 400 PBP-0012.
Body
application/json
Was this page helpful?

