Webhooks
Testing webhooks
Check your endpoint before a real payment depends on it.
Send a test delivery
A webhook.test event is queued at once, signed like any other, whatever events the endpoint listens to.
curl -X POST "https://el-b.com/api/v1/webhooks/0199c1e4-7a2b-7d31-9e0f-4b6c8d2a1f57/test" \
-H "Authorization: Bearer $ELB_API_KEY" \
-H "Accept: application/json" use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('ELB_API_KEY'))
->acceptJson()
->post('https://el-b.com/api/v1/webhooks/0199c1e4-7a2b-7d31-9e0f-4b6c8d2a1f57/test');
$payment = $response->json('data'); const response = await fetch('https://el-b.com/api/v1/webhooks/0199c1e4-7a2b-7d31-9e0f-4b6c8d2a1f57/test', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.ELB_API_KEY}`,
Accept: 'application/json',
},
});
const { data } = await response.json(); import os
import requests
response = requests.request(
"POST",
"https://el-b.com/api/v1/webhooks/0199c1e4-7a2b-7d31-9e0f-4b6c8d2a1f57/test",
headers={"Authorization": f"Bearer {os.environ['ELB_API_KEY']}"},
)
data = response.json() Check the log
Seconds later, List deliveries shows the attempt and what your server answered. A 401 there usually means the signature check uses the wrong secret, or a parsed body.
Follow a real payment
Create a small payment, then cancel it: you receive payment.created, payment.cancelled and the status changes, and the payment's credits come back to your balance.
On your machine
El-B can only call public addresses. To receive deliveries on your computer, expose your local server through an HTTPS tunnel and register the tunnel's address; delete that endpoint when you are done.