Unreal Engine Integration
Gx402 provides Blueprint-first and C++-first patterns for calling x402 via your Express middleware. Unreal packaging, platform constraints, and input methods differ from Unity — this guide focuses on practical handoff patterns (deep links, companion apps, WalletConnect).Prerequisites
- Unreal Engine 4.27+ or Unreal Engine 5
- A way to open external browser or webview from a packaged game (for WalletConnect)
- Companion app / deep-link support for consoles or tight packaging scenarios
- A Gx402 Express middleware running the
/create-paymentand/confirm-paymentendpoints
Typical flow (packaged & Blueprint-friendly)
- Player triggers purchase in UI (Blueprint event).
- CreatePaymentNode calls your backend
/create-payment. - Backend returns
payload+paymentId. - Game opens WalletConnect session (external browser or system webview).
- Wallet signs payload; companion app or deep-link returns signature.
- Game calls
/confirm-paymentwith signature to finalize.
Blueprint concept
OnBuy->CreatePaymentNode->OnSuccess->OpenWalletConnect-> Wait ->ConfirmPaymentNode->OnFinalgrant item.
