PayPal Integration — Dynamic Pricing & Negotiation Flow
Automating luxury-product negotiations with real-time offers, counter-offers, and PayPal authorizations for Rug & Kilim.
E-Commerce / API Automationrugandkilim.comI. The Challenge
High-value rug buyers often negotiate before purchasing. Rug & Kilim needed a native, frictionless way to submit offers directly on product pages — with automated backend workflows to authorize funds, calculate tax, email confirmations, and manage counter-offers — all without disrupting WooCommerce’s checkout logic.
II. The Solution & Architecture
Built a full PayPal “Make an Offer” integration using WooCommerce, custom AJAX endpoints, and PayPal’s REST API. Buyers submit offers via a front-end modal powered by Gravity Forms + PayPal JS SDK, which authorizes the payment (not capture). The backend logs the authorization, calculates tax, and generates a WooCommerce order in “offer” status. Admins can accept, reject, or issue counter-offers directly from the dashboard — triggering automated email flows.
System Architecture
III. Technology Stack
Frontend
- WooCommerce Template Override
- Gravity Forms + AJAX Modal
- PayPal JS SDK (Authorize Intent)
- Custom ZIP-based Tax Calculation
Backend & APIs
- WordPress + WooCommerce
- PayPal REST API (v2)
- Custom PHP Endpoints & Webhooks
- WooCommerce Order Meta Storage
Automation
- Dynamic Offer Validation
- Automated Counter-Offer Emails
- Admin Capture/Reject Actions
- Real-Time Logging via wc_get_logger
Infrastructure & Tracking
- SiteGround Cloud Hosting
- NitroPack Caching
- Google Analytics Events + UTMs
- Conversion Attribution
IV. Results & Impact
Increase in conversions on high-value rugs
Offer flow deployed to production and actively collecting engagement data
Offers handled automatically without admin input
Average PayPal API latency on authorization
Key Learnings
- •Mapping PayPal API responses to WooCommerce order meta simplified admin workflows & reporting.
- •Automating counter-offer logic through custom metabox actions reduced turnaround from hours to minutes.
- •Pre-authorizing offers built buyer trust and streamlined multi-step negotiations without plugins.
