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
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








![Add custom data to Clerks User object [S2 E5]
Metadata allows for custom data to be saved on the User object. There are three types of metadata: unsafe, public, and private.
ππΌ Clerk docs
β https://clerk.com/docs/users/metadata Add custom data to Clerks User object [S2 E5]](https://i.ytimg.com/vi/JXyiG2rvh1Y/mqdefault.jpg)

