{"id":255159,"date":"2024-08-17T11:29:55","date_gmt":"2024-08-17T11:29:55","guid":{"rendered":"https:\/\/michigandigitalnews.com\/index.php\/2024\/08\/17\/integrating-usdc-payments-with-wagmi-and-programmable-wallets\/"},"modified":"2025-06-25T17:12:14","modified_gmt":"2025-06-25T17:12:14","slug":"integrating-usdc-payments-with-wagmi-and-programmable-wallets","status":"publish","type":"post","link":"https:\/\/michigandigitalnews.com\/index.php\/2024\/08\/17\/integrating-usdc-payments-with-wagmi-and-programmable-wallets\/","title":{"rendered":"Integrating USDC Payments with Wagmi and Programmable Wallets"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div>\n<figure class=\"figure mt-2\">&#13;<br \/>\n                                &#13;<\/p>\n<p>&#13;<br \/>\n                                    <a href=\"https:\/\/blockchain.news\/Profile\/Peter-Zhang\">Peter Zhang<\/a>&#13;<br \/>\n                                    <span class=\"publication-date ml-2\"> Aug 17, 2024 11:28<\/span>&#13;\n                                <\/p>\n<p>&#13;<\/p>\n<p class=\"lead\">Learn how to integrate USDC payments into your e-commerce platform using Wagmi and Circle&#8217;s Programmable Wallets for seamless and instant transactions.<\/p>\n<p>&#13;<br \/>\n                                <a href=\"https:\/\/image.blockchain.news:443\/features\/58C560F94F04130770112E2CB6E21C52A7EFFD6CD20603271E090714B2250752.jpg\">&#13;<br \/>\n                                    <img decoding=\"async\" class=\"rounded\" src=\"https:\/\/image.blockchain.news:443\/features\/58C560F94F04130770112E2CB6E21C52A7EFFD6CD20603271E090714B2250752.jpg\" alt=\"Integrating USDC Payments with Wagmi and Programmable Wallets\"\/>&#13;<br \/>\n                                <\/a>&#13;<br \/>\n                            <\/figure>\n<p>In the rapidly evolving world of e-commerce, providing a seamless payment experience is crucial for both merchants and customers. According to <a rel=\"nofollow\" href=\"https:\/\/www.circle.com\/blog\/how-to-build-a-usdc-payment-experience-with-wagmi-and-programmable-wallets\">Circle<\/a>, integrating USD Coin (USDC) payments can offer a globally accessible alternative payment method for online stores, accelerating cash flow with near-instant settlement.<\/p>\n<h2>How It Works<\/h2>\n<p>When a customer initiates a payment, they connect their wallet and send USDC directly to a wallet address created specifically for the business using Programmable Wallets. This wallet is generated automatically through a script, ensuring every transaction is secure and organized.<\/p>\n<h2>Step-by-Step Integration<\/h2>\n<h3>Step 1: Create a New Wagmi Project<\/h3>\n<p>To start, build the front-end by creating a new Wagmi project using TypeScript. Open your terminal and run the command:<\/p>\n<pre><code>npm create wagmi@latest<\/code><\/pre>\n<p>This will scaffold a new Wagmi project with the necessary configurations.<\/p>\n<h3>Step 2: Install Required Dependencies<\/h3>\n<p>Navigate to your project directory and install the required dependencies by running:<\/p>\n<pre><code>npm install<\/code><\/pre>\n<h3>Step 3: Configure Your Project Files<\/h3>\n<p>Set up the necessary files in your project folder structure. Start by creating a `config` folder in the parent directory and then move and modify the `wagmi.ts` file accordingly.<\/p>\n<h3>Step 4: Create Components<\/h3>\n<p>In your project directory, create a components folder and add the following files:<\/p>\n<ul>\n<li><strong>PayButton.tsx:<\/strong> This will handle the payment button functionality.<\/li>\n<li><strong>ProductCard.tsx:<\/strong> This will display the product details.<\/li>\n<\/ul>\n<h2>Step 5: Create the Landing Page<\/h2>\n<p>Create a new file named `page.tsx` in the src\/pages directory to import and render the ProductCard component, providing a user interface for customers.<\/p>\n<h2>Step 6: Add External API Calls<\/h2>\n<p>Utilize Programmable Wallets by creating a new file named `createWallet.js` in the src\/pages\/api directory. This will handle external API calls for creating a wallet.<\/p>\n<h3>Step 7: Configure Environment Variables<\/h3>\n<p>Create a .env file in the root of your project and add your Circle Web3 Services credentials:<\/p>\n<pre><code>CIRCLE_API_KEY=\nCIRCLE_ENTITY_SECRET=<\/code><\/pre>\n<h3>Step 8: Run the Application<\/h3>\n<p>Start the development server with the following command:<\/p>\n<pre><code>npm run dev<\/code><\/pre>\n<h3>Step 9: Access the Application<\/h3>\n<p>Open your browser and navigate to http:\/\/localhost:3000 to see your application in action.<\/p>\n<h2>Conclusion<\/h2>\n<p>Circle&#8217;s Programmable Wallets simplify the process of embedding wallet functionality into applications, making it easy to accept USDC as a payment method for businesses. By leveraging the createWallet.js script and the PayButton.tsx component, merchants can offer seamless payment experiences for global customers with near-instant settlement.<\/p>\n<p><span><i>Image source: Shutterstock<\/i><\/span><\/p>\n<p>                            <!-- Divider --><\/p>\n<p>                            <!-- Author info END --><br \/>\n                            <!-- Divider --><\/p><\/div>\n<p>[ad_2]<br \/>\n<br \/><a href=\"https:\/\/blockchain.news\/news\/integrating-usdc-payments-wagmi-programmable-wallets\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] &#13; &#13; &#13; Peter Zhang&#13; Aug 17, 2024 11:28&#13; &#13; Learn how to integrate USDC payments into your e-commerce platform using Wagmi and Circle&#8217;s<\/p>\n","protected":false},"author":1,"featured_media":255160,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[171],"tags":[],"_links":{"self":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts\/255159"}],"collection":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/comments?post=255159"}],"version-history":[{"count":0,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts\/255159\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/media\/255160"}],"wp:attachment":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/media?parent=255159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/categories?post=255159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/tags?post=255159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}