-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Payper is an open-source Java library that dramatically simplifies the integration with PayPal's extensive suite of REST APIs. If you're building a Java backend solution that needs to integrate with PayPal, Payper will significantly reduce your development time and allow you to focus on your core business logic.
Integrating with PayPal's REST API can be complex and time-consuming. Payper provides:
- Simplified Integration: Clean, fluent API that makes PayPal integration straightforward
- OAuth 2.0 Token Management: Automatic token acquisition, caching, and renewal
- High Performance: Optimized for multithreaded, high-concurrency applications
- Dual Mode Support: Both synchronous and asynchronous (CompletableFuture) operations
- Type Safety: Immutable objects and thread-safe design
- Comprehensive Coverage: Support for 6+ PayPal REST APIs with more coming
- Installation & Usage - Maven dependencies and quick start guide
- Authentication - Configure OAuth 2.0 credentials
- Configuration - Advanced configuration options
-
Use Cases - Common workflows and practical examples
- Creating and managing products
- Working with subscriptions and billing plans
- Processing orders and payments
- Managing invoices
- Webhook management and verification
- Java 17+: Modern Java features and best practices
- Thread-Safe: Immutable objects ensure safety in concurrent environments
- Fluent API: Intuitive builder pattern for readable, maintainable code
- Automatic Token Management: OAuth 2.0 authentication handled transparently
-
Sync & Async: Choose between blocking (
.toEntity()) or non-blocking (.toFuture()) operations - Optimized Performance: Designed for high-throughput production systems
Payper currently supports the following PayPal APIs:
| API | Version | Documentation |
|---|---|---|
| Catalog Products | v1 | PayPal Docs |
| Subscriptions | v1 | PayPal Docs |
| Orders | v2 | PayPal Docs |
| Payments | v2 | PayPal Docs |
| Invoices | v2 | PayPal Docs |
| Webhooks Management | v1 | PayPal Docs |
Get started with Payper in just 5 minutes! Here's a simple example creating a product:
// 1. Add dependency (see Installation & Usage)
// 2. Configure credentials (see Authentication)
// 3. Create and use the client
var catalogProductsApiClient = CatalogProductsApiClient.create();
var productRequest = ProductRequestPOST.builder()
.name("Product Name")
.description("Product Description")
.type(ProductRequestPOST.Type.PHYSICAL)
.category(ProductCategory.ACCESSORIES)
.imageUrl("https://example.com/image.jpg")
.build();
var product = catalogProductsApiClient.products()
.create()
.withBody(productRequest)
.retrieve()
.toEntity();
System.out.println("Created product ID: " + product.id());Coming soon:
- Tracking (v1)
- Disputes (v1)
- Partner Referrals (v2)
- Payment Experience (v1)
- Payment Method Tokens (v3)
- Payouts (v1)
- Transaction Search (v1)
- GitHub Repository - Source code and issue tracker
- Example Projects - Complete working examples
- PayPal Developer Portal - Official PayPal API documentation
- Maven Central - Latest releases
- Payper Part 1: 5-Minute Guide - Quick introduction and first steps
- Payper Part 2: Orders API - Deep dive into the Orders API
Payper is released under the Apache 2.0 License.
Contributions are welcome! Please feel free to submit issues or pull requests on the GitHub repository.
Ready to simplify your PayPal integration? Start with the Installation & Usage guide!