PayPal Integration
Connect PayPal to LostChurn for automatic failed payment recovery.
The PayPal integration is live. Connect your PayPal account in your LostChurn dashboard under Settings > Integrations.
PayPal is one of the world's most widely used payment platforms, supporting both PayPal wallet payments and direct credit/debit card processing. LostChurn connects to PayPal via OAuth 2.0 and processes webhook notifications to detect and recover failed subscription payments.
Prerequisites
- An active PayPal Business account
- Access to the PayPal Developer Dashboard with admin permissions
- A PayPal REST API app created in the Developer Dashboard (or willingness to create one during setup)
- A LostChurn account with at least one workspace created
Connection Steps
LostChurn connects to PayPal using OAuth 2.0, which provides secure, token-based access without exposing long-lived API keys.
- In your LostChurn dashboard, go to Settings > Integrations and click Connect PayPal.
- You will be redirected to PayPal's consent page. Log in with your PayPal Business account.
- Review the requested permissions:
- Billing Agreements: Read and execute
- Payments: Read and create
- Subscriptions: Read and manage
- Webhooks: Read and create
- Click Grant Permission.
- You are redirected back to LostChurn with OAuth tokens automatically configured.
- LostChurn registers the required webhook subscriptions with PayPal. No manual webhook setup is needed.
Alternative: Manual API App Setup
If your organization requires manual credential management:
- Go to the PayPal Developer Dashboard.
- Click Create App.
- Name the app
LostChurnand select Merchant as the app type. - Copy the Client ID and Secret.
- In your LostChurn dashboard, select Connect with API Credentials on the PayPal integration page.
- Select your environment (Sandbox or Live), paste the Client ID and Secret, and click Save and Verify.
Webhook Configuration
If you connected via OAuth, LostChurn automatically registers webhooks. For manual connections:
- In the PayPal Developer Dashboard, go to My Apps & Credentials and select the
LostChurnapp. - Scroll down to Webhooks and click Add Webhook.
- Set the Webhook URL to:
https://webhooks.lostchurn.com/v1/paypal - Select the following event types:
PAYMENT.SALE.COMPLETEDPAYMENT.SALE.DENIEDPAYMENT.SALE.REFUNDEDPAYMENT.SALE.REVERSEDBILLING.SUBSCRIPTION.CREATEDBILLING.SUBSCRIPTION.ACTIVATEDBILLING.SUBSCRIPTION.UPDATEDBILLING.SUBSCRIPTION.CANCELLEDBILLING.SUBSCRIPTION.SUSPENDEDBILLING.SUBSCRIPTION.PAYMENT.FAILEDBILLING.SUBSCRIPTION.RE-ACTIVATEDBILLING.SUBSCRIPTION.EXPIREDCUSTOMER.DISPUTE.CREATEDCUSTOMER.DISPUTE.RESOLVEDCUSTOMER.DISPUTE.UPDATED
- Click Save.
Webhook Signature Verification
PayPal signs webhook notifications using its own certificate-based verification system. LostChurn verifies each incoming webhook by calling PayPal's POST /v1/notifications/verify-webhook-signature endpoint, which cryptographically validates that the notification originated from PayPal.
Verify Connection
- In the PayPal Developer Dashboard, go to My Apps & Credentials, select the LostChurn app, and navigate to Webhooks.
- Click Simulate Event next to the LostChurn webhook.
- Select
BILLING.SUBSCRIPTION.PAYMENT.FAILEDas the event type and click Send Test. - In your LostChurn dashboard, navigate to Events and confirm the test event appears.
- For a more thorough test in sandbox mode, create a test subscription using PayPal's sandbox buyer account and simulate a payment failure.
A successful connection shows a green Connected badge on the PayPal card in Settings > Integrations.
Supported Events
| PayPal Event | LostChurn Action |
|---|---|
BILLING.SUBSCRIPTION.PAYMENT.FAILED | Creates a failed payment record, triggers retry evaluation |
PAYMENT.SALE.COMPLETED | Marks recovery as successful, stops active dunning |
PAYMENT.SALE.DENIED | Creates denied payment record, triggers retry evaluation |
PAYMENT.SALE.REFUNDED | Records refund for revenue reporting |
PAYMENT.SALE.REVERSED | Records reversal, pauses recovery |
BILLING.SUBSCRIPTION.CREATED | Registers new subscription for monitoring |
BILLING.SUBSCRIPTION.ACTIVATED | Records subscription activation |
BILLING.SUBSCRIPTION.UPDATED | Updates subscription metadata |
BILLING.SUBSCRIPTION.CANCELLED | Records churn event, triggers reactivation campaign if configured |
BILLING.SUBSCRIPTION.SUSPENDED | Triggers dunning sequence |
BILLING.SUBSCRIPTION.RE-ACTIVATED | Records reactivation, stops dunning |
BILLING.SUBSCRIPTION.EXPIRED | Records expiration for analytics |
CUSTOMER.DISPUTE.CREATED | Pauses retry and dunning, flags dispute |
CUSTOMER.DISPUTE.RESOLVED | Resumes or stops recovery based on resolution |
Provider-Specific Notes
PayPal Wallet vs. Card Payments
PayPal supports two primary payment types for subscriptions:
- PayPal Wallet: Customers pay using their PayPal balance, linked bank account, or PayPal Credit. Failed payments due to insufficient PayPal balance behave differently from card declines. LostChurn adjusts retry timing for wallet-based failures, which often resolve when the customer adds funds.
- Card Payments: Customers pay via credit or debit card processed through PayPal. These behave similarly to direct card payments and use the same decline code taxonomy.
LostChurn identifies the payment type from the webhook payload and applies the appropriate recovery strategy.
Sandbox Environment
PayPal provides a comprehensive sandbox at sandbox.paypal.com:
- Create sandbox buyer and seller accounts in the Developer Dashboard under Sandbox > Accounts.
- Sandbox transactions use simulated processing and do not charge real accounts.
- LostChurn labels sandbox events with a
sandboxbadge.
Reference Transactions
PayPal's reference transaction feature allows merchants to charge a customer's PayPal account without requiring re-authorization. If your PayPal account has reference transactions enabled, LostChurn can use them for retries, improving recovery rates by charging without requiring customer intervention.
Note that reference transactions require PayPal approval and are not available on all accounts. Contact PayPal support to check eligibility.
PayPal Subscriptions API vs. Billing Agreements
PayPal offers two subscription systems:
- Subscriptions API (current): Uses plan-based subscriptions with built-in lifecycle management. LostChurn supports this fully.
- Billing Agreements (legacy): Older system using billing agreement tokens. LostChurn supports billing agreements but recommends migrating to the Subscriptions API for richer event data.
Buyer Protection and Disputes
PayPal's buyer protection program means disputes are more common than with direct card payments. LostChurn automatically pauses all retry and dunning activity when a dispute is opened and resumes only after the dispute is resolved in the merchant's favor.
Rate Limits
PayPal enforces rate limits that vary by API endpoint and account tier. General limits are approximately:
- Standard accounts: 30 requests per second.
- High-volume accounts: Custom limits negotiated with PayPal.
LostChurn monitors PayPal's rate limit response headers and throttles requests accordingly. If you receive 429 errors in your LostChurn logs, contact PayPal to request a rate limit increase.
Multi-Currency
PayPal supports payments in 25+ currencies. LostChurn tracks recovery amounts in the original transaction currency and provides consolidated reporting in your configured base currency using PayPal's exchange rates.