paypal_sdk
1.0.11, released 2 years ago by omnimind.tech
PayPal SDK for integrating PayPal REST APIs in Dart/Flutter apps.
What it does
Provides Dart wrappers for PayPal REST endpoints such as catalog products, orders, payments, subscriptions, and webhooks. Handles authentication, request building, and response parsing for PayPal services.
AI-written summary of version 1.0.11, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to call PayPal REST APIs directly from a Flutter/Dart app
- You want a pure‑Dart client that works on mobile, web and desktop
- You need built‑in support for PayPal orders, subscriptions or webhooks
Skip it when
- You require a payment gateway other than PayPal
- You need a full‑featured UI checkout flow (the SDK is API‑only)
- You prefer a server‑side integration for security reasons
Strengths
- Covers most PayPal APIs (orders, payments, subscriptions, webhooks)
- Cross‑platform pure Dart implementation
- Simple to add as a regular dependency
Weaknesses
- Limited to PayPal only, no multi‑gateway support
- No code‑generated models or UI components
- Manual error handling and request construction required
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 3
Add paypal_sdk to pubspec.yaml, run flutter pub get, and provide PayPal client ID/secret as per PayPal docs.
import 'package:paypal_sdk/paypal_sdk.dart';
void main() async {
final client = PayPalClient(
clientId: 'YOUR_CLIENT_ID',
secret: 'YOUR_SECRET',
environment: PayPalEnvironment.sandbox,
);
final order = await client.createOrder(
amount: '10.00',
currency: 'USD',
);
print('Order ID: ${order.id}');
}Alternatives
Packages that do the same job and could replace paypal_sdk.
Works with
Packages commonly used together with paypal_sdk: ones it builds on, ones built on it, and its own family.