Webhook Payloads
When an event occurs, AstraPay sends a POST request to your webhook URL with the following structure.
Payload format
{
"event": "payment.completed",
"timestamp": "2026-03-31T12:05:00.000Z",
"data": {
"payment_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"short_id": "pXk9mQ",
"amount": 25.00,
"token": "USDC",
"network": "BASE",
"status": "completed",
"transaction_hash": "0xabc123...",
"test_mode": false
}
}Request headers
Header
Description
Content-Type
application/json
X-AstraPay-Signature
HMAC signature for verification
X-AstraPay-Event
Event type (e.g. payment.completed)
Payload by event type
payment.completed
payment.expired
payment.canceled
payment.partially_paid
Last updated