Create a webhook subscription
curl --request POST \
--url https://b2b-api-sandbox.easyonramp.com/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://api.example.com/webhooks/easyonramp"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://api.example.com/webhooks/easyonramp'})
};
fetch('https://b2b-api-sandbox.easyonramp.com/api/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://b2b-api-sandbox.easyonramp.com/api/v1/webhooks"
payload = { "url": "https://api.example.com/webhooks/easyonramp" }
headers = {
"Authorization": "Bearer <token>",
"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://b2b-api-sandbox.easyonramp.com/api/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://api.example.com/webhooks/easyonramp\"\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))
}{
"id": "<string>",
"secret": "<string>"
}Webhooks
Create a webhook subscription
Register an HTTPS URL on your server to receive signed event notifications. Omit events (or pass [”*”]) to subscribe to every event type. The signing secret is returned once on create; store it immediately.
POST
/
api
/
v1
/
webhooks
Create a webhook subscription
curl --request POST \
--url https://b2b-api-sandbox.easyonramp.com/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://api.example.com/webhooks/easyonramp"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://api.example.com/webhooks/easyonramp'})
};
fetch('https://b2b-api-sandbox.easyonramp.com/api/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://b2b-api-sandbox.easyonramp.com/api/v1/webhooks"
payload = { "url": "https://api.example.com/webhooks/easyonramp" }
headers = {
"Authorization": "Bearer <token>",
"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://b2b-api-sandbox.easyonramp.com/api/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://api.example.com/webhooks/easyonramp\"\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))
}{
"id": "<string>",
"secret": "<string>"
}Authorizations
Bearer JWT issued to your business account during onboarding
Body
application/json