MoonPay webhooks

MoonPay webhooks are HTTP POST requests that MoonPay sends to your endpoint when a crypto buy or sell transaction, a customer's KYC status or a virtual account changes.

11 events covered

How MoonPay webhooks work

Webhooks push asynchronous updates to your server, so you don't have to poll MoonPay for a transaction's status. MoonPay sends a POST with a JSON body to each endpoint subscribed to the event, and a 2xx within 5 seconds counts as delivered. Two integrations send them: the widget sends buy, sell, identity and virtual account events, and the newer Platform API sends KYC and buy transaction updates.

The top-level type field says what happened. Widget transaction and identity events carry the object in data, while virtual account events carry it in body. The Platform KYC event adds id and timestamp. MoonPay's docs disagree about Platform buy updates: the overview points to the widget's transaction_updated, and the Platform OpenAPI file shows {eventTime, data} with no type. MoonPay documents no payload version.

Key facts

Signature header
Moonpay-Signature-V2

Format: t=<unix seconds>,s=<lowercase hex>

Scheme
HMAC-SHA256, hex
Signed material
{t}.{raw body}

t from the Moonpay-Signature-V2 header, a literal period, then the raw request body. A JSON parser changes the bytes, so verify before you parse.

How events are identified
type field in the body; Platform buy updates may lack it
Body format
JSON

Content type: application/json.

Legacy signature
Moonpay-Signature

Same t=,s= form as V2, but keyed with the endpoint's signing secret rather than the webhook API key.

Other headers
webhook-id, content-type
Envelope
type, data, externalCustomerId
Agent skill
npx skills add hookdeck/webhook-skills --skill moonpay-webhooks

Verify MoonPay webhooks →

Setting up MoonPay webhooks

  • Add an endpoint in the dashboard's webhook settings, then choose all event types or specific ones. One event can go to several endpoints.
  • Create one setting for test mode and one for live mode, even if both use the same URL.
  • To test locally, run the Hookdeck CLI: hookdeck listen 3000 moonpay --path /webhooks/moonpay, then use its URL as the test mode endpoint. MoonPay's own docs suggest ngrok or webhook.site.
  • MoonPay documents no way to resend an event. After an outage, read transactions from its API instead.

Delivery behaviour

  1. Duplicate deliveries

    MoonPay delivers at least once. Deduplicate Platform events on the webhook-id header, and widget transactions on type, data.id and data.updatedAt.

    Handle duplicates →
  2. Out-of-order delivery

    MoonPay events can arrive out of order, especially around retries. Compare the payload's updatedAt with the state you've stored and ignore older updates.

    Handle ordering →
  3. Events lost after a short outage

    MoonPay stops after 10 attempts, and with backoff from 1 second that takes minutes. Once retries run out the event isn't redelivered, so reconcile from its API after any outage.

    Retries and reconciling →
  4. Platform docs that disagree

    MoonPay's Platform overview says Moonpay-Signature-V2 and points to the widget transaction_updated body, while its Platform OpenAPI file says X-Signature and {eventTime, data}. Send one test mode delivery and check before building on either.

    Other MoonPay limits →

MoonPay webhook best practices

Common MoonPay webhook events

Buy

transaction_created Customer creates a buy transaction in the widget
transaction_updated Buy transaction's status or details change
transaction_failed Buy transaction fails

Sell

sell_transaction_updated Sell transaction's status or details change
sell_transaction_requote_required Price moved before the deposit arrived, so the sale needs a new quote
sell_transaction_failed Sell transaction fails

Identity

identity_check_updated Customer's KYC status changes in a widget integration
customer.identity_status_updated Customer's KYC status changes on the Platform API

Events by resource

Resource Events Payloads
sell

sell_transaction_created · _transaction_updated · _transaction_failed · _transaction_requote_required

4 1
buy

transaction_created · transaction_updated · transaction_failed

3 1

1 more resource, including Other MoonPay events. All 11 events →

In this hub

Webhook events → Every covered MoonPay event, with payloads where the registry has them.
MCP events → How an agent subscribes to MoonPay events as MCP events.
Verify signatures → Signature facts, verification code and common failures.
Production guide → Production problems, such as timeouts and retries, and how to handle them.
Agent skill → Install the webhook skill in your coding agent. npx skills add hookdeck/webhook-skills --skill moonpay-webhooks

Keep a short outage from losing your MoonPay events.

Event Gateway verifies the signature and answers MoonPay as soon as it accepts each delivery, so a slow handler or a failed deploy doesn't use up MoonPay's retries, and your events wait in its queue until your service recovers.

Not affiliated with MoonPay. Facts are compiled from public sources and linked inline.