Documentation Index
Fetch the complete documentation index at: https://dev.moonpay.com/llms.txt
Use this file to discover all available pages before exploring further.
URL
Requirements
Size
The frame container height must be 44px. Width is flexible; the Google Pay button inside the frame uses 100% of the container width.Permissions
Thepayment permission policy is required.
When using a sandboxed iframe, include allow-scripts, allow-popups, allow-same-origin, and allow-forms. See Google Pay inside sandboxed iframe for PCI DSS v4 compliance for details.
Example
Initialization parameters
| Property | Type | Required | Description |
|---|---|---|---|
clientToken | string | ✅ | The client token returned from the connect flow. |
channelId | string | ✅ | A unique identifier for the frame generated on your client. This value is attached to each postMessage payload to help identify messages.The format of this string is up to you. |
signature | string | ✅ | The quote signature from the quote endpoint. Pass signature as returned. |
externalTransactionId | string | Your own identifier for the transaction. Stored and associated with the MoonPay transaction for correlation. |
Events
All events are dispatched using the message pattern described in the frames protocol. Below are the event payloads specific to the Google Pay frame.Outbound events
frame->parent These events are sent from this frame to the parent window.handshake
The frame requests that you open a message channel.
ready
The frame finished loading and the UI is fully rendered. You can use this to coordinate UI transitions if needed.
complete
The transaction is complete. Use the transaction ID to track status updates (for example, by polling or via webhooks).
challenge
Verification is required before the transaction can proceed. Render the
challenge frame at the provided URL. Do not
construct the URL yourself — use it as-is.
error
This event dispatches errors that occur in the flow and, if available, provides steps for recovery.
| Code | Description |
|---|---|
configurationError | The frame configuration is invalid. Check initialization parameters. |
quoteExpired | The quote has expired. Fetch a new quote and send it via setQuote. |
invalidQuote | The quote signature is invalid or malformed. |
googlePayUnavailable | Google Pay is not available in the current environment or browser. |
generic | An unexpected error occurred. |
Inbound events
parent->frame These events are sent from the parent window to this frame.ack
Acknowledge the handshake.
setQuote
Provide a new quote to the frame. Pass signature as returned by the quote endpoint. Upon receiving this event, the frame disables the Google Pay button until the quote is revalidated.