# 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.

Agent skill: `npx skills add hookdeck/webhook-skills --skill moonpay-webhooks` ([details](https://hookdeck.com/webhooks/moonpay/skill))

> Independent reference generated from hookdeck/webhook-registry (commit ff7f882, 20 Nov 2026). [MoonPay's official docs](https://dev.moonpay.com/api-reference/platform/webhooks/overview).

[Overview](https://hookdeck.com/webhooks/moonpay) · [Webhook events (11)](https://hookdeck.com/webhooks/moonpay/events) · [MCP events](https://hookdeck.com/webhooks/moonpay/mcp-events) · [Verify signatures](https://hookdeck.com/webhooks/moonpay/verify) · [Production guide](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts) · [Agent skill](https://hookdeck.com/webhooks/moonpay/skill)

## Key facts

| Fact | Value | Source |
|---|---|---|
| Signature header | `Moonpay-Signature-V2` Format: t=<unix seconds>,s=<lowercase hex> | [MoonPay docs](https://dev.moonpay.com/api-reference/platform/webhooks/overview) |
| Scheme | `HMAC-SHA256, hex` | [MoonPay docs](https://dev.moonpay.com/api-reference/platform/webhooks/overview) |
| 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. | [MoonPay docs](https://dev.moonpay.com/api-reference/platform/webhooks/overview) |
| How events are identified | `type field in the body; Platform buy updates may lack it` | [MoonPay docs](https://dev.moonpay.com/widget/off-ramp/customization/requote-webhooks) |
| Body format | `JSON` Content type: application/json. | [MoonPay docs](https://dev.moonpay.com/api-reference/widget/webhooks/overview) |
| Legacy signature | `Moonpay-Signature` Same t=,s= form as V2, but keyed with the endpoint's signing secret rather than the webhook API key. | [MoonPay docs](https://dev.moonpay.com/api-reference/widget/webhooks.openapi.json) |
| Other headers | `webhook-id, content-type` | [MoonPay docs](https://dev.moonpay.com/api-reference/platform/webhooks/overview) |
| Envelope | `type, data, externalCustomerId` | [MoonPay docs](https://dev.moonpay.com/api-reference/platform/webhooks/overview) |
| Agent skill | `npx skills add hookdeck/webhook-skills --skill moonpay-webhooks` | [Agent skill →](https://hookdeck.com/webhooks/moonpay/skill) |

[Verify MoonPay webhooks](https://hookdeck.com/webhooks/moonpay/verify)

## 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.

## Setting up MoonPay webhooks

- Add an endpoint in the dashboard's [webhook settings](https://dashboard.moonpay.com/developers/#webhooks), 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](/docs/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

- **Timeout:** 5 seconds. anything else but a 2xx in that time is a failed delivery. [Guide](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts#timeouts)
- **Retries:** up to 9. exponential backoff from 1 second, roughly doubling, for 10 attempts in all. [Guide](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts#retries)
- **After retries:** not redelivered. MoonPay documents no manual resend. [Guide](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts#retries)
- **Ordering:** not guaranteed. use `updatedAt` in the payload, not arrival order. [Guide](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts#ordering)

## Known failure modes

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](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts#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](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts#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](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts#retries)
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](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts#other-limits)

From [Hookdeck's MoonPay guide](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts).

## MoonPay webhook best practices

- **[Verify every signature](https://hookdeck.com/webhooks/moonpay/verify).** Check `Moonpay-Signature-V2` against the raw body with your webhook API key, and return `400` if it's missing or wrong.
- **[Return a 2xx within 5 seconds](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts#timeouts).** Store the event and respond before doing anything else, because MoonPay treats a slower answer as a failed delivery.
- **[Make your handler idempotent](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts#duplicates).** Delivery is at least once. Deduplicate on `webhook-id` for Platform events, and on `type`, `data.id` and `data.updatedAt` for widget transactions.
- **[Compare `updatedAt` before writing](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts#ordering).** Events can arrive out of order, so ignore an update that's older than the state you've stored.
- **[Reconcile after an outage](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts#retries).** MoonPay stops after 10 attempts and doesn't redeliver, so read transactions from its API to catch anything you missed.
- **[Surface requotes in your product](https://hookdeck.com/webhooks/moonpay/guide-duplicates-ordering-retries-timeouts#choosing-events).** `sell_transaction_requote_required` means the customer can accept or decline a new quote, so show it in-app instead of relying on MoonPay's email.

## Common MoonPay webhook events

### Buy

- [transaction_created](https://hookdeck.com/webhooks/moonpay/events#transaction_created): Customer creates a buy transaction in the widget
- [transaction_updated](https://hookdeck.com/webhooks/moonpay/events#transaction_updated): Buy transaction's status or details change
- [transaction_failed](https://hookdeck.com/webhooks/moonpay/events#transaction_failed): Buy transaction fails

### Sell

- [sell_transaction_updated](https://hookdeck.com/webhooks/moonpay/events#sell_transaction_updated): Sell transaction's status or details change
- [sell_transaction_requote_required](https://hookdeck.com/webhooks/moonpay/events#sell_transaction_requote_required): Price moved before the deposit arrived, so the sale needs a new quote
- [sell_transaction_failed](https://hookdeck.com/webhooks/moonpay/events#sell_transaction_failed): Sell transaction fails

### Identity

- [identity_check_updated](https://hookdeck.com/webhooks/moonpay/events#identity_check_updated): Customer's KYC status changes in a widget integration
- [customer.identity_status_updated](https://hookdeck.com/webhooks/moonpay/events#customer.identity_status_updated): Customer's KYC status changes on the Platform API

## Events by resource

| Resource | Events | Payloads |
|---|---|---|
| [sell](https://hookdeck.com/webhooks/moonpay/events#resource-sell) | 4 | 1 |
| [buy](https://hookdeck.com/webhooks/moonpay/events#resource-buy) | 3 | 1 |

1 more resource. [All 11 events](https://hookdeck.com/webhooks/moonpay/events)

## In this hub

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

Not affiliated with MoonPay. Facts are compiled from public sources and linked inline. [View as JSON](https://hookdeck.com/webhooks/moonpay.json) · [Report a correction](https://hookdeck.com/contact)
