Web Payments SDK with React & Next.js @SquareDev
Web Payments SDK with React & Next.js  @SquareDev
Uploaded May 2024 | Updated September 2026, 2 days ago
In this how to guide, we walk through the process of adding online payments to a Next.js application using the Square Web Payments SDK. This implementation utilizes all of the modern Next features such as the app router and server actions to create a seamless developer experience.

Chapters:
0:00 - Introduction
0:23 - Install React Square Web Payments SDK
0:40 - Create Frontend Payment Form
1:52 - Next.js Server Actions
2:18 - Create Server Action File
2:33 - Initialize Square Node.JS Client
3:07 - Process Payment with Server Action
3:44 - Connect Frontend and Backend
3:58 - Conclusion

Resources:
Github Repository: github.com/Square-Developers/corner-blog-examples/tree/main/squaredev-next-online-payments-example
React Square Web Payments SDK: react-square-payments.weareseeed.com/docs
Web Payments SDK with React & Next.jsSandbox 101: React Square Web Payments SDKBuilding a Closed-Loop WalletSandbox 101: Build Order Ahead with Order ManagerSandbox 101: In-App Payments with FlutterSandbox 101: Implementing WebhooksSandbox 101: Ad Hoc Line-Items on an OrderSandbox 101: Linking Customer DataThe Sandbox: IdempotencySquare Unboxed 2023: A Partner and Developer EventBeyond the Network: Unlocking the Power of Programmable Traffic with NgrokMain Stage | Executive Panel
Square Developer |

Web Payments SDK with React & Next.js

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER