Build an AI Image App with Next.js, Clerk & PayPal @hamedbahram
Build an AI Image App with Next.js, Clerk & PayPal  @hamedbahram
Uploaded November 2026 | Updated December 2026, 3 hours ago
Building an AI app is the fun part. Getting paid for it is where most projects stall. In this video I build Pixel Perfect, an AI image generation and editing app, and wire up two payment models with PayPal: one-time credit top-ups with PayPal Checkout and a monthly plan with PayPal Subscriptions. Clerk handles authentication.

πŸ§ͺ Try it yourself: create a free PayPal sandbox account and test the integration without a real card β†’ developer.paypal.com/sandbox-testing/accounts

πŸ’» Get the code: the full project from this video is on GitHub, including the setup script that creates your PayPal products, subscription plan, and webhook. Clone the repo, add your PayPal sandbox credentials, and follow along β†’ github.com/paypaldev/video-HamedBahram-paypal-tutorial.git

Pixel Perfect runs on Black Forest Labs’ FLUX.3 Image model. You can generate images, edit them while staying true to the original, combine up to 10 reference images, and place elements by drawing boxes on a canvas. New visitors get three free generations, then sign in with Clerk to keep going. From there they can buy a credit pack or subscribe to the Pro plan for 250 credits a month.

You’ll see how to:
β€’ Create a PayPal developer app and get your sandbox credentials
β€’ Set up sandbox business and personal accounts to test payments
β€’ Sell one-time credit packs with PayPal Checkout
β€’ Offer monthly subscriptions with PayPal Subscriptions
β€’ Use PayPal’s JS SDK v6 alongside your own API routes
β€’ Run a setup script that creates your products, subscription plan, and webhook
β€’ Gate generations behind Clerk sign-in and track credits in Neon + Drizzle

⏱️ Chapters
00:00 – Pixel Perfect: AI image editing with FLUX.3
00:30 – Two payment models: credit packs + subscriptions
01:00 – Demo: placing elements on the canvas
01:50 – Free generations, then sign in with Clerk
02:40 – The stack: Next.js, Clerk, Neon + Drizzle, FLUX.3, PayPal
03:20 – Pricing: credit packs + Pro subscription
03:50 – PayPal developer dashboard + sandbox app
04:30 – Sandbox business & personal accounts
05:30 – Buying a credit pack with PayPal Checkout
06:47 – Code: PayPal orders & subscriptions routes
07:30 – PayPal JS SDK v6
07:50 – Setup script: products, plan & webhook
08:20 – Account page: credits, purchases & activity
09:00 – Wrap-up

πŸ”— Links
Try Pixel Perfect β†’ https://pixel-perfect-sage-six.vercel.app
PayPal Developer β†’ developer.paypal.com
PayPal Checkout docs β†’ developer.paypal.com/checkout
PayPal Subscriptions docs β†’ developer.paypal.com/subscriptions/about
Clerk β†’ clerk.com
FLUX.3 by Black Forest Labs β†’ bfl.ai

Questions? Drop them in the comments and I’ll jump in. Cheers πŸ‘‹

#PayPal #PayPalDeveloper #nextjs
Build an AI Image App with Next.js, Clerk & PayPalNested Layouts in NextJs 13 Using Route GroupsNextJs 14 Release Notes and UpdatesUsing Prisma with TurborepoKyles Take on React 19, AI, and the Discipline Behind SuccessRecreating Alicia Keys site with Prismic & NextJsInfinite Scrolling in NextJs 13 Using Server ActionsNextJs Image ComponentTemplates vs Layouts in NextJs 13Add custom data to Clerks User object [S2 E5]Send SMS & WhatsApp Messages From One API (Next.js)Build full-stack apps using Chef by Convex
Hamed Bahram |

Build an AI Image App with Next.js, Clerk & PayPal

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER