How paypal merchant processing customer complaints, settle disputes
1. start https://developer.paypal.com/ get id of the business application developer accounts and secret
2. Get a temporary token by id and key
curl -v https://api.paypal.com/v1/oauth2/token -u "id:key" -d "grant_type=client_credentials"
3. Pull controversial list, which pulled dispute_state parameter refers to the type of dispute
curl -v -X GET "https://api.paypal.com/v1/customer/disputes?page=1&page_size=50&dispute_state=REQUIRED_ACTION" -H "Content-Type: application/json" -H "Authorization: Bearer token"
4. Pull the individual details of the dispute, which contains the transaction number and other information
curl -v -X GET https://api.paypal.com/v1/customer/disputes/{dispute_id} -H "Content-Type: application/json" -H "Authorization: Bearer token"
5. assume liability for any claim by ID, a refund
curl -v -X POST https://api.paypal.com/v1/customer/disputes/{dispute_id}/accept-claim -H "Content-Type: application/json" -H "Authorization: Bearer Access-Token" -d '{"note": "Full refund to the customer."}'
Details Reference
https://developer.paypal.com/docs/api/customer-disputes/v1/#disputes_list