Skip to main content

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.

The reset frame is a headless page hosted on a MoonPay domain. Use it to clear the user’s authentication tokens stored on MoonPay’s domain, allowing partners to log users out. The frame communicates completion or errors to the parent window via postMessage.

URL

https://blocks.moonpay.com/platform/v1/reset

Initialization parameters

ParameterTypeRequiredDescription
channelIdstringA 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.
apiKeystringYour publishable API key.
languagestringLanguage code for localization.
themestringlight or dark.

Events

All events are dispatched using the message pattern described in the frames protocol. Below are the event payloads specific to the reset frame.

Outbound events

frame->parent These events are sent from this frame to the parent window.

handshake

Sent when the frame loads. The parent must respond with ack.
{
  "version": 2,
  "meta": { "channelId": "ch_1" },
  "kind": "handshake"
}

complete

Sent when the user’s session has been successfully cleared.
{
  "version": 2,
  "meta": { "channelId": "ch_1" },
  "kind": "complete"
}

error

Sent when the reset fails.
{
  "version": 2,
  "meta": { "channelId": "ch_1" },
  "kind": "error",
  "payload": {
    "code": "generic",
    "message": "Failed to clear session"
  }
}

Inbound events

parent->frame These events are sent from the parent window to this frame.

ack

Must be sent in response to handshake. The frame will not proceed until it receives this.
{
  "version": 2,
  "meta": { "channelId": "ch_1" },
  "kind": "ack"
}