Connect your PayPal Business account to your site so you can accept PayPal payments in your iOS app.
If you haven't already, make sure that you have activated the Components and PayPal services in the Unity Portal. For more information, see Activation.
- In the Unity Portal, go to Merchant setup > Sites.
- Select a site.
- In the Services tab, find the PayPal service and click Edit.
- Click PayPal account.
- Click Connect PayPal account. A PayPal pop-up opens.
- Enter your credentials, then click Next.
- Click Agree and Continue. A confirmation message is displayed.
- Click Return to PXP to go back to the Unity Portal.
If your connection is successful, a success message is displayed and your connection details are visible. You're now ready to proceed with configuring PayPal for iOS payouts.
If your connection is unsuccessful, a warning is displayed. See the Troubleshooting guide for more information.
Now configure your PayPal Developer account for backend API integration:
- Log in to the PayPal Developer Dashboard
- Go to Apps & Credentials.
- Select the environment:
- Sandbox: For development and testing
- Live: For production
- Click Create App.
- Enter an App Name (e.g., "My App Payouts").
- Select Merchant as the app type.
- Click Create App.
- In your app settings, scroll to Features.
- Ensure Payouts is enabled.
- If not enabled, click Enable next to Payouts.
If you don't see the Payouts option, your PayPal Business account may need additional verification. Contact PayPal Support for assistance.
You'll need these credentials for your backend integration.
- Go to Sandbox environment
- Select your app
- Copy the following:
- Client ID: Used for backend API authentication.
- Secret: Used for backend API authentication.
- Go to the Live environment.
- Select your app.
- Copy the following:
- Client ID: For production backend API authentication.
- Secret: For production backend API authentication.
- Never commit credentials to version control.
- Store secrets in environment variables or secure vaults.
- Use different credentials for sandbox and live environments.
- Rotate secrets regularly.
For testing, you'll need to create several sandbox accounts.
- In Developer Dashboard, go to Sandbox > Accounts.
- Click Create Account.
- Select Businessthe account type.
- Set Account Balance (e.g., $10,000 for testing).
- Click Create Account.
Note the email and password for testing.
- Create additional Personal sandbox accounts.
- These will receive test payouts.
- Create multiple accounts to test different scenarios.
To receive real-time notifications about the payout status:
In your app settings, scroll to Webhooks.
Click Add Webhook.
Enter your webhook URL:
https://yourdomain.com/api/webhooks/paypalSelect the following event types:
PAYMENT.PAYOUTSBATCH.SUCCESS: Payout batch completedPAYMENT.PAYOUTSBATCH.DENIED: Payout batch deniedPAYMENT.PAYOUTS-ITEM.SUCCEEDED: Individual payout succeededPAYMENT.PAYOUTS-ITEM.FAILED: Individual payout failedPAYMENT.PAYOUTS-ITEM.BLOCKED: Payout blocked by PayPalPAYMENT.PAYOUTS-ITEM.RETURNED: Payout returned/refunded
Click Save.
Webhooks are recommended for production but not required. You can also poll the PayPal API for payout status.
Run a test API call to verify payout permissions:
curl -X POST https://api-m.sandbox.paypal.com/v1/oauth2/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-u "YOUR_CLIENT_ID:YOUR_SECRET" \
-d "grant_type=client_credentials"If successful, you'll receive an access token response.
- API base URL:
https://api-m.sandbox.paypal.com - Web URL:
https://www.sandbox.paypal.com - Use for: Development and testing
- Test accounts: Use sandbox accounts created in Step 5
- API base URL:
https://api-m.paypal.com - Web URL:
https://www.paypal.com - Use for: Production only
- Real accounts: Actual PayPal user accounts