TinyShip 1.7.0 Released
This version introduces PayPal payment support, a globally recognized payment platform supporting both one-time payments and subscriptions, enabling seamless integration for applications targeting international users.
β¨ Core Additions
PayPal Provider: New payment provider implementation (libs/payment/providers/paypal.ts) supporting Orders + Capture and Subscriptions API
Factory & Type Updates: Payment factory and type definitions updated in libs/payment/index.ts to support PayPal
Dual Payment Modes: Supports both one-time payments (Orders API) and recurring subscriptions (Subscriptions API)
Webhook Endpoints: Complete webhook implementations for both Next.js and Nuxt applications
π― Supported Features
| Feature | Support | Notes |
|---|---|---|
| One-time Payment | β | Orders + Capture API |
| Subscription | β | Requires Product/Plan setup in PayPal Dashboard |
| Credits Recharge | β | Supported |
| Sandbox Testing | β | Full sandbox environment support |
π§ Technical Highlights
PayPal REST API Integration: Native PayPal REST API for reliable payment processing
Webhook Handlers:
- Next.js:
apps/next-app/app/api/payment/webhook/paypal/route.ts - Nuxt:
apps/nuxt-app/server/api/payment/webhook/paypal.post.ts - Supports comprehensive event handling for payments and subscriptions
Return URL Handler:
- Handles both order capture and subscription activation
apps/next-app/app/api/payment/return/paypal/route.tsapps/nuxt-app/server/api/payment/return/paypal.get.ts
UI Updates:
- Orders cards display PayPal provider in both Next.js and Nuxt dashboards
- Payment success pages handle PayPal return flow
i18n Support: English and Chinese strings updated throughout dashboard and admin panels
π Documentation
New documentation added:
- PayPal Configuration Guide:
docs/user-guide/payment/paypal - Payment Overview Updated: PayPal added to supported payment methods
π‘ Key Differences from Other Providers
| Aspect | PayPal | Stripe | Alipay |
|---|---|---|---|
| Subscription | β Requires Dashboard Plan setup | β Price ID | β Not supported |
| One-time | β Orders + Capture | β Checkout | β Page Pay |
| Sandbox | β Full support | β Test mode | β Sandbox |
| Currency | Multi-currency | Multi-currency | CNY only |