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
Render the frame in a modal or sheet. Width and height are flexible — size the container to fit your UI.The Add Card frame uses MoonPay’s existing card input UI. A redesign is
planned to streamline the experience and explore hosted fields for full design
customization.
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. |
Events
All events are dispatched using the message pattern described in the frames protocol. Below are the event payloads specific to the Add Card 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 card input UI is fully rendered.
complete
The card was added successfully. Use card.id to get a quote without
re-fetching payment methods.
error
An error occurred during card addition.
| Code | Description |
|---|---|
configurationError | Missing or invalid clientToken |
generic | Card creation failed |