Skip to main content

Recommended: JavaScript SDK with React Hooks

For new React apps, we recommend the JavaScript SDK with React Hooks (@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.
This guide covers Coinbase’s Apple Pay Guest Checkout for purchases under $500 without KYC. For the default Coinbase onramp experience with full features, see Default Onramps and Customizing the Onramp Experience.
This guide is for JavaScript only.

Overview

Coinbase onramp integration allows users to purchase cryptocurrency directly within your application using Coinbase’s payment infrastructure. This integration supports Apple Pay Guest Checkout, enabling US users without a Coinbase account to deposit up to $500 per week.

Dashboard setup

To enable Coinbase onramp:
  1. Go to the Funding tab in your Dynamic developer dashboard
  2. Under “Fiat on-ramps”, toggle on Coinbase
  3. Accept any additional terms and conditions
  4. Save the settings

Coinbase-specific functions

The following functions are specific to Coinbase onramp and provide advanced control over the onramp flow.

createCoinbaseOnrampOrder

Creates a Coinbase onramp order programmatically. This function is useful when you want full control over the order creation process, such as for Apple Pay Guest Checkout.
See Coinbase’s create an onramp order documentation for reference.
Call getMissingVerificationForCoinbaseOnrampOrder before creating an order to check if any user data needs to be collected or verified. If required information is missing (like a verified phone number), the order will fail.

Parameters

Response

getMissingVerificationForCoinbaseOnrampOrder

Checks if the user has the required verified credentials (email and phone number) to create a Coinbase onramp order. This is useful for pre-validating users before attempting to create an order.

Error codes

addCoinbaseOnrampOrderEventListener

Listens to Coinbase onramp order events to track when an order is canceled, confirmed, completed, or fails. Use this after triggering an order to provide real-time feedback to users.

Event types

Return value

The function returns a cleanup function that removes the event listener. Call this when you no longer need to listen for events (e.g., when the user closes the dialog or navigates away).

Order status values

Testing in sandbox

To test Coinbase onramp without real transactions:
  1. Set isSandbox: true when creating orders
  2. Or prefix your partnerUserRef with “sandbox-” (e.g., “sandbox-user-1234”)
When using sandbox mode with Apple Pay, the payment link URL will automatically include &useApplePaySandbox=true.

Requirements

For Apple Pay Guest Checkout, users must have:
  • A verified email address
  • A verified phone number (verified within the last 60 days)
Use getMissingVerificationForCoinbaseOnrampOrder to check these requirements before creating an order.

Collecting and verifying user credentials

Dynamic sends the phone number and email associated with the Dynamic user when creating an onramp order. You can use the following functions to collect and verify user credentials.

Collecting email and phone number

Use updateUser to store collected email or phone number in the user’s verified credentials. This function returns OTP verification details if verification is required.

Verifying with OTP

After updating user credentials, use verifyOTP to complete the verification process with the code sent to the user.

Re-verifying expired phone numbers

Coinbase requires phone numbers to be verified within the last 60 days. If a user’s phone verification has expired, use sendSmsOTP to trigger re-verification, then complete with verifyOTP.

Supported countries and payment methods

Coinbase onramp supports various countries and payment methods. The United States has the most comprehensive support, including Apple Pay for Guest Checkout. See the Customizing the Onramp Experience page for a complete list of supported countries and payment methods.
Last modified on June 25, 2026