PayPal Data Source
Overview
The PayPal connector provides powerful data ingestion capabilities for payment processing, transaction reporting, and financial analytics. You can choose from pre-configured endpoint templates for common use cases or manually configure custom endpoints for specific data requirements.
Prerequisites
Before creating a PayPal data source, ensure you have:
- A configured PayPal credential (see PayPal Authorization)
- Access to the PayPal data you want to ingest
- Understanding of PayPal's data structure and API endpoints
For complete information about PayPal's API capabilities, see the official PayPal API documentation.
Endpoint Templates
The following pre-configured endpoint templates are available for common PayPal data ingestion scenarios:
- Get Transactions: Retrieve all payment transactions with automatic pagination
- Get Invoices: Retrieve all invoices with automatic pagination
Get Transactions
Get Invoices
Manual Configuration
If the pre-configured templates don't meet your needs, you can manually configure custom PayPal API endpoints.
API Method
Select the HTTP method for your API request:
- GET: For retrieving data (most common for PayPal API)
- POST: For creating or updating resources
API Endpoint URL
Configure the complete PayPal API endpoint URL:
- Base URL: Use the environment-specific URL from your credential:
- Live:
https://api.paypal.com/v1/orhttps://api.paypal.com/v2/ - Sandbox:
https://api.sandbox.paypal.com/v1/orhttps://api.sandbox.paypal.com/v2/
- Live:
- Resource Path: Specify the PayPal resource you want to access (e.g.,
reporting/transactions,invoicing/invoices) - Query Parameters: Add any required or optional query parameters
Example URLs:
https://api.paypal.com/v1/reporting/transactions- Retrieve all transactionshttps://api.paypal.com/v2/invoicing/invoices- Retrieve all invoiceshttps://api.paypal.com/v1/payments/payment- Retrieve payment details
Date/Time Macros
Use dynamic datetime placeholders for flexible endpoint configuration:
${start.cron}: Current execution time in cron format${start.iso}: Current execution time in ISO 8600 format${start.unix}: Current execution time as Unix timestamp
Example with date filtering:
https://api.paypal.com/v1/reporting/transactions?start_date=${start.unix}
Lookup-Based Macros
Reference data from other Nexla sources for dynamic endpoint configuration:
${lookup.source_name.field_name}: Access specific fields from other data sources${lookup.source_name.field_name[*]}: Access array elements from lookup sources
Path to Data
Specify which part of the PayPal API response contains the relevant data:
- JSON Path: Use dot notation for nested data access
$.transaction_details[*]- All transactions in the response$.items[*]- All items in the response$.links[*]- Pagination links
Metadata
Preserve contextual information from PayPal API responses:
$.total_items: Total number of items available$.total_pages: Total number of pages available$.links: Pagination and related resource links
Request Headers
Configure additional HTTP headers for API customization:
- Authorization: Automatically handled by Nexla using your PayPal credential
- Content-Type: Usually
application/jsonfor PayPal API - Accept: Specify response format (e.g.,
application/json) - PayPal-Request-Id: Unique request identifier for idempotency
Example headers:
Content-Type: application/json
Accept: application/json
PayPal-Request-Id: ${message.id}
Testing Your Configuration
After configuring your PayPal data source:
- Test Connection: Verify that Nexla can successfully connect to PayPal
- Preview Data: Review a sample of the data that will be ingested
- Validate Schema: Ensure the data structure matches your expectations
- Check Rate Limits: Monitor PayPal's rate limiting to avoid API throttling
PayPal has rate limits that vary by endpoint and account type. Monitor your API usage in the PayPal Developer Dashboard to ensure you stay within limits.
Always test your PayPal data source with sandbox credentials first. PayPal charges real money for live transactions, so use sandbox mode during development and testing.