Webhooks
Webhooks allow you to receive real-time notifications about events in your Linka account.
Setting Up Webhooks
- Go to your Linka Dashboard
- Navigate to Settings > Webhooks
- Add your webhook URL
- Select the events you want to receive
Webhook Events
Payment Events
payment.created- A new payment was createdpayment.completed- A payment was completedpayment.failed- A payment failed
Purchase Events
purchase.created- A new purchase was createdpurchase.completed- A purchase was completedpurchase.failed- A purchase failed
Webhook Payload
All webhooks include the following structure:
{
"event": "payment.completed",
"data": {
"id": "pay_123",
"amount": "100.00",
"currency": "USDC",
"status": "completed"
},
"timestamp": "2024-01-01T00:00:00Z"
}
Verifying Webhooks
Webhooks include a signature header that you can use to verify the request:
X-Linka-Signature: sha256=...
Security
- Always verify webhook signatures
- Use HTTPS for webhook endpoints
- Implement idempotency to handle duplicate events