Skip to main content

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 Transactions

Retrieve all payment transactions from your PayPal account with automatic pagination. This endpoint is ideal for comprehensive transaction analysis and financial reporting.

  • Transaction Details: Includes payment amounts, currencies, statuses, and timestamps
  • Automatic Pagination: Handles pagination to retrieve all available transactions
  • Comprehensive Data: Includes buyer information, payment methods, and transaction metadata

This endpoint retrieves all transactions regardless of status or type. Use manual configuration if you need to filter transactions by specific criteria such as date range or payment status.

Get Invoices

Get Invoices

Retrieve all invoices from your PayPal account with automatic pagination. This endpoint is ideal for invoice management and billing analytics.

  • Invoice Details: Includes invoice amounts, due dates, statuses, and customer information
  • Automatic Pagination: Handles pagination to retrieve all available invoices
  • Billing Data: Includes line items, taxes, discounts, and payment terms

This endpoint retrieves all invoices regardless of status or type. Use manual configuration if you need to filter invoices by specific criteria such as date range or invoice status.

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:

  1. Base URL: Use the environment-specific URL from your credential:
    • Live: https://api.paypal.com/v1/ or https://api.paypal.com/v2/
    • Sandbox: https://api.sandbox.paypal.com/v1/ or https://api.sandbox.paypal.com/v2/
  2. Resource Path: Specify the PayPal resource you want to access (e.g., reporting/transactions, invoicing/invoices)
  3. Query Parameters: Add any required or optional query parameters

Example URLs:

  • https://api.paypal.com/v1/reporting/transactions - Retrieve all transactions
  • https://api.paypal.com/v2/invoicing/invoices - Retrieve all invoices
  • https://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/json for 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:

  1. Test Connection: Verify that Nexla can successfully connect to PayPal
  2. Preview Data: Review a sample of the data that will be ingested
  3. Validate Schema: Ensure the data structure matches your expectations
  4. 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.

Important

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.