Webhook Events

Reference for all webhook event types, payloads, and best practices for handling Mesta webhooks.

Webhook Events

Mesta sends webhook notifications when key events occur in the system. Use webhooks to receive real-time updates about orders, senders, beneficiaries, and other entities.

Setup

  1. Register a webhook using the Create Webhook API
  2. Verify signatures using the shared secret (see Webhook Signature Verification)
  3. Return 200 OK promptly to acknowledge receipt

Event Types

Order Events

These events track the lifecycle of an order from creation to completion.

EventDescription
order.createdOrder has been created
order.awaiting_fundsOrder is ready to receive funds
order.awaiting_funds_timeoutFunds were not received in time
order.funds_receivedFunds have been received and confirmed
order.in_progressOrder is being processed
order.need_reviewOrder requires manual review
order.sent_to_beneficiaryFunds have been sent to the beneficiary
order.successOrder completed successfully
order.failedOrder failed
order.cancelledOrder was cancelled
order.refund_in_progressRefund is being processed
order.refundedRefund has been completed

Sender Events

EventDescription
sender.verification.pendingSender verification is in progress
sender.verification.approvedSender has been verified and approved
sender.verification.declinedSender verification was declined

Beneficiary Events

EventDescription
beneficiary.verification.pendingBeneficiary verification is in progress
beneficiary.verification.approvedBeneficiary has been verified and approved
beneficiary.verification.declinedBeneficiary verification was declined

Payment Method Events

EventDescription
payment_method.approvedPayment method has been approved
payment_method.declinedPayment method was declined
payment_method.pending_user_consentPayment method requires user consent

Webhook Payload Format

All webhook payloads follow this structure:

{
  "id": "evt_550e8400-e29b-41d4-a716-446655440000",
  "type": "order.success",
  "merchantId": "550e8400-e29b-41d4-a716-446655440001",
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "status": "COMPLETED",
    "senderId": "550e8400-e29b-41d4-a716-446655440003",
    "beneficiaryId": "550e8400-e29b-41d4-a716-446655440004"
  },
  "createdAt": "2025-01-15T10:30:00.000Z"
}
FieldTypeDescription
idstringUnique event ID
typestringEvent type (see tables above)
merchantIdstringYour merchant ID
dataobjectEvent-specific payload containing the affected entity
createdAtstringISO 8601 timestamp

Best Practices

  1. Respond quickly — Return 200 within 5 seconds. Process webhooks asynchronously.
  2. Handle duplicates — Use the event id to deduplicate. The same event may be delivered more than once.
  3. Verify signatures — Always verify the webhook signature before processing.
  4. Handle unknown events — Ignore event types you don't recognize. New events may be added.
  5. Implement retries — If your endpoint returns a non-2xx status, Mesta will retry delivery with exponential backoff.