Prerequisites
- Guest checkout enabled on your partner account. Contact your MoonPay account team.
- A server that can create session tokens with your secret key.
- A UI surface where you can render the Apple Pay frame and the challenge frame.
- The customer’s email and phone number, collected on your server. MoonPay accepts these as partner-verified, so you are responsible for their accuracy.
- The timestamp at which the customer accepted MoonPay’s terms (see Record terms acceptance).
How it works
- Your server creates a session that includes the customer’s email, phone number, and terms acceptance.
- You check the connection, which returns the customer’s capabilities. When
guestCheckoutis present, offer the Apple Pay guest path; otherwise connect the customer with the standard flow. - You get a quote and render the Apple Pay frame.
- On the customer’s first purchase, MoonPay creates the guest account and processes the payment. If extra verification is needed, the frame emits a challenge that resolves the purchase.
Record terms acceptance
Capture the timestamp when the customer accepts MoonPay’s terms, and pass it astermsAcceptedAt when you create the session. MoonPay records the live terms version at that moment and binds the acceptance to the guest account.
termsAcceptedAt must be no more than 60 seconds ahead of server time. Capture it the moment the customer taps your accept control, then create the session immediately.
Create a session
Create the session on your server with your secret key. For guest checkout, include the customer’semail, phoneNumber, and termsAcceptedAt alongside the standard fields.
See the sessions API
reference for all fields
and error responses.
If guest checkout is not enabled for your account, or the customer’s region is
not supported, the session still succeeds — the
guestCheckout capability is
simply absent in the next step, and you connect the customer with the standard
flow instead.Check for guest checkout
Pass thesessionToken to the client and check the connection. The check runs in an invisible frame and returns the customer’s capabilities. When capabilities.guestCheckout is present, offer the Apple Pay guest path. You can also check the session manually.
A returning customer whose email and phone match an existing MoonPay account
is recognized at this step. Connect them with the standard
flow — low-friction authentication
prompts for a one-time passcode instead of a full login.
Get a quote
Request an executable quote for Apple Pay. Only quotes withexecutable: true can be used to execute a transaction.
Render the Apple Pay frame
Render the Apple Pay frame with the quote signature. When the customer taps the button and authorizes, MoonPay creates the guest account from the Apple Pay name and billing address, then processes the payment. For the frame URL, size, permissions, and events, see the Apple Pay frame reference.Apple Pay
Handle verification
Some guest purchases need the customer to complete an extra step before the payment goes through. For example, the customer confirms their identity when the email and phone match an existing account, authenticates when the purchase is larger than the guest limit allows, or provides more identity details. In every case the Apple Pay frame emits achallenge event with a URL.
Render the challenge frame at that URL. The challenge frame guides the customer through the required steps and completes the purchase itself, then emits complete — you do not re-render the Apple Pay button. See Handle challenges for the full flow.
An amount above the customer’s maximum limit that verification cannot raise is terminal. The frame returns a failed transaction, so prompt the customer to try a smaller amount.
Upgrade a guest account
A guest account is a real MoonPay account with lower limits. To raise them, connect the customer and have them complete full identity verification — the limits lift on the same account, with no migration. Use the connect flow, then guide the customer through verification. You can prompt this after a completed guest purchase, or when a purchase exceeds the guest limit.Transaction statuses
Transactions have the following statuses:- Pending: The transaction has been initiated and the payment accepted. The assets are being transferred.
- Complete: The transaction is finalized. The payment is complete and the assets have been delivered to their destination.
- Failed: The transaction has failed. The payment was not executed and funds were not transferred.