Event types
M2M sends webhooks for the following events:link.created
Sent when a magic link is created via the API. Use this to confirm link creation asynchronously and track the beginning of the link lifecycle.Payload
string
required
Always
link.created.string
required
ISO 8601 timestamp when the webhook was generated.
object
required
Event payload.
Example handler
Node.js
link.opened
Sent when a user opens a magic link for the first time. Use this to track engagement and prepare for potential data requests.Payload
string
required
Always
link.opened.string
required
ISO 8601 timestamp when the webhook was generated.
object
required
Event payload.
Example handler
Node.js
user.data_request
Sent when M2M needs additional user data to complete identity verification (CIP). This happens when the user data provided during link creation is incomplete.This webhook gives you an opportunity to provide user data before M2M asks the user directly. Responding quickly improves user experience.
Payload
string
required
Always
user.data_request.string
required
ISO 8601 timestamp when the webhook was generated.
object
required
Event payload.
Responding to data requests
When you receive this webhook, you can provide the missing data by making a PUT request to thereplyEndpoint:
cURL
You only need to provide the fields listed in
requiredFields. Any additional fields you provide will be stored but aren’t required.Response to your PUT request
Example handler
Node.js
What happens if you don’t respond?
If you don’t respond to the data request (or can’t provide the data), M2M will prompt the user to enter the missing information directly in the widget. This increases friction but ensures the transaction can still complete. See Data Requests for more details on this flow.operation.created
Sent when a user completes a money transfer operation through the widget. Use this to record transactions in your system and trigger downstream processes.Payload
string
required
Always
operation.created.string
required
ISO 8601 timestamp when the webhook was generated.
object
required
Event payload.
Example handler
Node.js
operation.cancelled
Sent when a user cancels a money transfer operation from the widget. Use this to update your records, release any held resources, and keep your system in sync.Payload
string
required
Always
operation.cancelled.string
required
ISO 8601 timestamp when the webhook was generated.
object
required
Event payload.
Example handler
Node.js
Handling webhooks
Complete example
Here’s a complete webhook handler that processes all event types:Node.js
Next steps
Webhook Security
Learn how to verify webhook signatures.
Data Requests
Deep dive into the data request flow.