Webhook
Accrue sends webhook events to your configured webhook_url whenever a P2P payment changes state. You set this URL on your API key.
Event Payload
Every webhook is an HTTPS POST to your webhook_url with a JSON body shaped like:
event_type
string
Machine-readable name of the event (see list below).
data
object
Event-specific payload.
Events
payment.assigned
A payment has been assigned to your bot.
payment.paid
A payment has been marked as paid.
payment.canceled
A payment has been canceled.
p2p_payment.status.updated
A P2P payment status has changed.
Verifying Webhooks
Every request includes two headers for verification:
X-CASHRAMP-TOKEN
Your webhook token from the API key.
X-CASHRAMP-SIGNATURE
HMAC-SHA256 signature of the raw request body, signed with your webhook token.
Always verify both before processing the payload.
Responding to Webhooks
Return 200 OK immediately. Any non-2xx or timeout is treated as a delivery failure and the event will be retried.
Offload any heavy processing to a background job — keep your webhook handler fast.
Last updated