On this page
No Headings
Last updated: June 24, 2026
Estimated time: 20 minutes
Use these procedures to configure your PayPal business and sandbox accounts to manage disputes in the Resolution Center or to integrate with the Disputes API.
You can use the procedures in this section to ensure that your accounts and environment are set up to manage disputes.
Use this path if you only need to test and manage disputes manually through the PayPal Resolution Center without integrating the Disputes API.
⋮.Use this path if you plan to integrate the Disputes API and test automated dispute handling end to end.
Sign up for a developer account. On successful signup, PayPal automatically creates your sandbox environment. The sandbox environment is a test environment that helps you mimic real-world transactions. By default, the environment includes a business and personal account. When testing your app, you can use the personal account to create disputes and the business account to handle them. You can create additional business and personal accounts.
Set up the sandbox environment:
Optional: Configure a webhook listener for the app and subscribe to events:
For more information on webhooks, see Webhooks guide. For the list of disputes events that the app can subscribe to, see Webhook reference.
Retrieve sandbox app credentials: To integrate and test the Disputes API, you need the sandbox credentials (Client ID and Client secret) for your app. To retrieve them, see Get your client ID and client secret.
Get an access token: To authenticate your API calls, get an access token using your client ID and client secret. For more information, see Get started with PayPal REST APIs
Retrieve sandbox account credentials: When you test your disputes integration end-to-end, you log in to your PayPal personal account, create a dispute, handle it through your PayPal business account, and check the dispute status in both accounts. You need sandbox login credentials for both accounts. For information on how to get these from your developer account, see Get sandbox account credentials.
Set up the development environment. This involves building your server, installing dependencies, verifying configuration files that the package managers use, and setting up the environment variables.
To create disputes or change dispute reasons as a buyer using the Disputes API, you need to set up buyer-side credentials. To do this:
Contact your PayPal account manager to add the following scopes to your REST app:
| Scope name | Scope | Description |
|---|---|---|
DISPUTE_CREATE | https://uri.paypal.com/services/disputes/create | Scope to create a dispute. |
UPDATE_BUYER | https://uri.paypal.com/services/disputes/update-buyer | Scope to change the dispute reason. |
You need to obtain buyer consent to create disputes or change dispute reasons on behalf of your sandbox personal account (buyer) using the Disputes API. To do this:
application ID (client ID) as your app's client ID.container ID as lippButton.auth end point as sandbox. Confirm this is set to sandbox, as the field may default to production.scope as either https://uri.paypal.com/services/disputes/create or https://uri.paypal.com/services/disputes/update-buyer.return URL should match the one configured for your REST app in the previous step.During the API test simulation, include the PayPal-Auth-Assertion request header in API calls to create disputes or change dispute reasons as a buyer.
Generate the JSON Web Token (JWT) and pass it in this request header to identify the buyer.
Replace the following in the HTML code provided:
CLIENT_ID with your app's client ID.BUYER_EMAIL with the buyer's email address.Run this code in any HTML sandbox environment or save it as an HTML file and open it in a browser. This generates a JWT that you can use in the PayPal-Auth-Assertion request header.
<span id='cwppButton'></span>
<html>
<script>
function base64url(source) {
var encodedSource = btoa(source);
encodedSource = encodedSource.replace(/=+$/, '');
encodedSource = encodedSource.replace(/\+/g, '-');
encodedSource = encodedSource.replace(/\//g, '-');
return encodedSource;
}
function generateJWT() {
var header = {"alg": "none", "typ": "JWT"};
var data = {"iss":"CLIENT_ID", "email" : "BUYER_EMAIL" };
document.write(base64url(JSON.stringify(header)) + "." +
base64url(JSON.stringify(data)) + ".");
}
</script>
<body onload="generateJWT()"/>
</html>Issue: PayPal-Auth-Assertion header is ignored or rejected.
Fix: Verify that the JWT contains the correct CLIENT_ID and BUYER_EMAIL, and that you are using the sandbox personal account email for the buyer.
Use this path to manage disputes manually in production without building an API integration.
Log in to your PayPal business account at the PayPal Business Dashboard. No additional setup or configuration is required to use the Resolution Center in the live environment.
Use this path when you are ready to move your Disputes API integration from sandbox to production.
Optional: Configure a webhook listener for the app and subscribe to events:
For more information on webhooks, see Webhooks guide. For the list of dispute events that the app can subscribe to, see Webhook reference.
Optional: To download the files submitted as evidence, contact your PayPal account manager to add the following scopes to your REST app:
DOCUMENTS_DISPUTES_DOWNLOADdms_data_access_rule:all_of and dms_data_access_fields:account_number