Skip to main content

Webhook Implementation

Receive real-time notifications when events occur in usmewe.

Overview

Webhooks allow your application to react to events as they happen:
  • Loan funded/repaid
  • Vault deposits/withdrawals
  • Trust Score changes
  • Social Vault alerts

Setting Up Webhooks

1. Create an Endpoint

Create an HTTPS endpoint to receive webhook events:

2. Register the Webhook

Register your endpoint via API:

3. Verify Signatures

Always verify webhook signatures:

Event Structure

All webhook events follow this structure:

Available Events

Loan Events

loan.created

loan.funded

loan.repaid

loan.overdue

Vault Events

vault.deposit

vault.withdraw

Trust Score Events

trust_score.updated

Social Vault Events

social_vault.withdrawal_requested

social_vault.locked

Event Handling

Error Handling

Retry Logic

We retry failed webhooks with exponential backoff:

Handling Failures

Testing Webhooks

Send Test Event

Local Development

Use ngrok or similar for local testing:

Best Practices

Return 200 OK within 5 seconds. Process asynchronously:
Use event IDs for idempotency:
Log all webhooks for debugging:
Track webhook success rates and latencies.

Troubleshooting

Common Issues

Check Delivery History

Webhooks API

Full API reference

usmewe Pay

Payment integration