REST APIs
    Get Started with PayPal REST APIs
    Authentication
    Postman Guide
    API requests
    API responses
    Core Resources
    Overview
    API Integration
    Release Notes
    Orders
    Orders sdkV2
    Payments
    Payments sdkV2
    Payment Method Tokens
    Payment Method Tokens sdkV3
    Add Tracking
    Catalog Products
    Disputes
    Identity
    Invoicing
    Partner Referrals
    Payment Experience
    Payouts
    Referenced Payouts
    Subscriptions
    Transaction Search
    Webhooks Management
    Webhooks
    Overview
    Webhook event names
    Webhooks Events dashboard
    Webhooks simulator
    Integration
    Sandbox
    Overview
    Accounts
    Bulk Accounts
    Card testing
    Codespaces
    PayPal for Visual Studio Code
    Negative Testing
    Go Live
    Production Environment
    PayPal Application Guidelines
    PayPal Security Guidelines
    Rate Limiting Guidelines
    Idempotency
    Troubleshooting
    Not authorized
    Resource not found
    Unprocessable entity
    Validation error
    Reference
    Currency Codes
    Country Codes
    State & Province Codes
    Locale codes
    Deprecated Resources
    Deprecated resources
    Billing Agreements
    Billing Plans
    Invoicing v1
    Orders v1
    Partner Referrals v1
    Payments v1

PayPal sandbox testing guide

Overview

The PayPal sandbox is a self-contained, virtual testing environment that simulates the live PayPal production environment. The sandbox provides a shielded space where you can initiate and watch while your apps process PayPal API requests without touching any live PayPal accounts.

The PayPal sandbox mirrors the features on the PayPal production servers. While some PayPal features do not apply to the sandbox, such as closing an account, issuing monthly statements, storing shipping preferences, and PayPal Shops support, the sandbox has the same PayPal API feature set as the live environment. You can test your PayPal processes in the sandbox. Processes behave the same in the sandbox environment as they do on production servers.

When you initiate a transaction through a sandbox account, PayPal creates a mock transaction that behaves exactly like a transaction in the live environment. By using fictitious sandbox accounts with their associated authentication credentials in your PayPal API calls, you can test and debug your apps without referencing any real PayPal users or live PayPal accounts.

The sandbox lets you operate your application in a safe environment and provides a way to fine-tune your PayPal routines before you move your product into production.

The PayPal sandbox is made up of these components:

Component Access through
Sandbox test site https://www.sandbox.paypal.com/
Sandbox > Accounts page https://developer.paypal.com/dashboard/accounts

Just as you track live transactions on the PayPal live site, you track your sandbox transactions on the sandbox test site.

During the test phase, use the sandbox endpoints and your sandbox account details in each PayPal API request that you make. Create and manage your set of sandbox accounts from the sandbox Accounts page. Use the Sandbox test site to review the transactions associated with the calls you make using your sandbox accounts.

Tip: To review the status of the mock transactions associated with a sandbox account, log in to the sandbox test site with the credentials from any of your sandbox accounts.

The testing process

Test your application by creating a sandbox account for each user entity represented in your PayPal transactions. When testing, use the sandbox accounts in place of all the live accounts you will use while processing live transactions.

  1. Use your existing PayPal account to log in to the Developer website at developer.paypal.com , or create a new PayPal account by clicking the Sign Up button on this site.
  2. Create a set of virtual sandbox accounts.
  3. Format your PayPal API requests using the details from your sandbox accounts and run them against the sandbox endpoints.
  4. Review the responses and modify your application as necessary.
  5. When your application is fully functional and free of bugs, go live by updating the API credentials and endpoint targets.

Tips on creating your PayPal developer account

When you create your developer account, PayPal does a verification check by sending an email to the address you specified. Enable your account by responding to PayPal's email. If you don't receive the verification email within a few minutes after signing up, check to see that it hasn't been blocked or diverted to a spam folder.

Once your account is enabled, access the sandbox functionality by logging in to the PayPal Developer website using your developer account credentials.

When creating your PayPal developer account, consider creating an account that you don't mind sharing with others on your development team. This way, you can share your sandbox accounts without compromising the security of your personal PayPal account.

Important: When coding your PayPal application, make sure that it behaves in accordance with the PayPal application policies and guidelines.

Next

Learn about sandbox accounts.

Reference
PayPal.com
Privacy
Support
Legal
Contact