> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Buying USDC

> [!NOTE]
>
> This guide is currently React only.

## Enable Coinbase Onramp

To enable Coinbase Onramp, you need to first enable it in the Dynamic Console.

1. Go to the [funding page in the Dynamic Console](https://console.dynamic.xyz/dashboard/funding) and enable Coinbase Onramp
2. Configure the onramp to use USDC as the asset and set the default experience to buy ([onrampOptions](https://docs.dynamic.xyz/docs/react/money-and-funding/customizing-the-onramp-experience.md#onrampoptions))

You can customize onramp options by overriding the default options with custom configurations for USDC purchases:

```tsx React theme={"system"}
const onrampOptions = (defaultOnrampOptions) => {
  // Detect if we have a coinbase onramp option available
  const coinbaseOption = defaultOnrampOptions.find(option => option.id === "coinbaseOnramp");

  if (coinbaseOption) {
    // Use the coinbase onramp option as a base and add a new option with the USDC asset and buy experience
    const newOption = {
      ...coinbaseOption,
      id: "coinbaseUsdc",
      displayName: "Buy USDC",
      url: `${coinbaseOption.url}&defaultAsset=USDC&defaultExperience=buy`
    };
    return [...defaultOnrampOptions, newOption];
  }

  return defaultOnrampOptions;
};
```

Use the `DynamicContextProvider` with overrides to configure custom onramp options for your application:

```tsx React theme={"system"}
<DynamicContextProvider
    settings={{
        overrides: {
            onrampOptions
        }
    }}
>
    <DynamicWidget />
</DynamicContextProvider>
```

That's it! In the widget, when you hit deposit, you'll now see a Buy USDC option:

![Buy USDC](https://mintcdn.com/dynamic-docs/Mu-tjFQVUvR9RrdN/images/onramps/onramps-with-usdc.png?fit=max\&auto=format\&n=Mu-tjFQVUvR9RrdN\&q=85\&s=2de1102a56d604bea805c7e4fab4adc6)

![Buy USDC with Coinbase Onramp](https://mintcdn.com/dynamic-docs/Mu-tjFQVUvR9RrdN/images/onramps/onramps-with-usdc-2.png?fit=max\&auto=format\&n=Mu-tjFQVUvR9RrdN\&q=85\&s=b96f52144c6f9b6c09f8070e34521299)

## Next Steps

You can customize the icon and other aspects of the onramp experience. Learn more about that [here](https://docs.dynamic.xyz/docs/react/money-and-funding/customizing-the-onramp-experience.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.