PayPal Commerce Platform
PayPal Commerce Platform provides:- Direct PayPal checkout for customers
- PayPal business account payouts for sellers
- OAuth-based partner integration
- Webhook event notifications
Supported Countries
PayPal Commerce Platform is available in most countries except:Sellers in unsupported countries may still use PayPal for receiving customer payments, but cannot use PayPal Commerce Platform for payouts.
Configuration
Environment Variables
Configure PayPal in your.env file:
Gemfile Dependencies
Connecting PayPal Accounts
Sellers connect PayPal through the payment settings page.Connection Flow
1
Initiate Connection
Seller clicks “Connect PayPal” in Settings > Payments
2
OAuth Authorization
Seller is redirected to PayPal to:
- Log into their PayPal business account
- Grant permissions to Gumroad
- Confirm email address
3
Return to Gumroad
PayPal redirects back with merchant ID:
4
Verification
Gumroad verifies the account meets requirements:
- Primary email is confirmed
- Payments receivable permission granted
- OAuth integration properly configured
Eligibility Requirements
To connect PayPal, sellers must:-
Minimum Sales: $100 in total sales on Gumroad
- Country Support: Be in a PCP-supported country
- Email Confirmation: Have confirmed PayPal email
- Permissions: Grant required OAuth permissions
PayPal Webhooks
Gumroad listens for PayPal webhook events to track account status.Webhook Configuration
Register webhooks using the PayPal API:Handled Events
- Account Updated
- Consent Revoked
Updates merchant account when status changes:
PayPal for Customer Payments
Customers can pay with PayPal during checkout.Order Creation
Billing Agreements
For subscriptions, PayPal uses billing agreements:Billing agreements allow Gumroad to charge the customer’s PayPal account for recurring subscriptions without requiring re-authorization.
PayPal Instant Payment Notification (IPN)
Gumroad also supports PayPal’s legacy IPN system for backward compatibility.IPN Endpoints
- IPN Simulator: https://developer.paypal.com/developer/ipnSimulator/
- IPN Settings: https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-ipn-notify
- IPN History: https://www.paypal.com/us/cgi-bin/webscr?cmd=_display-ipns-history
Disconnecting PayPal
Sellers can disconnect PayPal from Settings > Payments:PayPal Payouts
When PayPal is the payout method:payment_address (PayPal email) when:
- No bank account is connected, OR
- Seller’s country doesn’t support native Stripe payouts
Testing PayPal Integration
For development:-
Sandbox Mode: Use PayPal sandbox credentials
- Test Accounts: Create test buyer and seller accounts in PayPal Developer Dashboard
- Webhook Testing: Use webhook.site to inspect webhook payloads