INSPIRATION: Say you're buying a camera body from Seller A and a matching lens from Seller B online. Normal checkouts process each seller right away, and PayPal's Orders v2 API actually blocks intent: "AUTHORIZE" when you pass multiple purchase_units (UNSUPPORTED_INTENT). So if Seller B goes out of stock or jacks up the price right after you click pay, Seller A already took your money. You end up paying for half a setup you can't even use and waiting days for manual refunds.

WHAT IT DOES: AtomPay puts an all-or-nothing safety layer in front of multi-seller PayPal checkouts: You add items from different sellers (or type a goal and let Gemini build the bundle) and mark what is Required vs Optional. Clicking PayPal places a single AUTHORIZE hold. Zero money leaves your account yet. Before capturing anything, our backend checks stock and live prices across every seller. If every required seller is good, PayPal captures each tranche (Partial CAPTURE with final_capture: true on the last one) and creates a settlement invoice. If a required seller fails and auto-swap is on, Gemini finds a compatible backup from another seller that fits inside your existing PayPal hold so you don't have to check out again. If no safe swap fits (or auto-swap is off), AtomPay immediately hits PayPal VOID and releases 100% of your hold ($0 charged). If only an optional add-on fails, it drops that item and settles the rest. Every hold, swap, capture, and void is tracked in an AG Grid ledger (with CSV/JSON export) and a live PayPal API Logs tab.

How we built it: Backend: Node.js, Express, TypeScript, PayPal Sandbox REST APIs (oauth2/token, v2/checkout/orders, authorize, payments/authorizations/capture, void, v2/invoicing/invoices), and @google/genai (gemini-flash-latest). Frontend: React, Vite, Tailwind CSS, @paypal/react-paypal-js, and ag-grid-react v33. Hosting: Deployed on Render via render.yaml (https://atompay-paypal.onrender.com).

Challenges we ran into PayPal's multi-unit AUTHORIZE restriction: Because PayPal throws UNSUPPORTED_INTENT on multi-purchase_units orders with AUTHORIZE, we consolidated the cart into one umbrella AUTHORIZE order and handled per-seller tranche captures and rollbacks on the backend. Keeping AI swaps inside the hold cap: We had to make sure any substitute Gemini picked stayed strictly under the remaining authorized balance so PayPal capture wouldn't fail. Cloud build issues on Render: Setting NODE_ENV=production in our initial Render blueprint skipped tsc and vite during install, which we fixed with NPM_CONFIG_PRODUCTION=false and --include=dev.

What's next Connecting real merchant inventory webhooks and adding PayPal reauthorization support for multi-day shipping delays.

Built With

Share this project:

Updates

Submission history