paypal商家如何處理客戶申訴,解決爭議
1.先從https://developer.paypal.com/獲取商家開發者賬戶的應用的id和secret
2.通過id和key獲取臨時token
curl -v https://api.paypal.com/v1/oauth2/token -u "id:key" -d "grant_type=client_credentials"
3.拉取爭議列表,其中dispute_state參數指要拉取的爭議類型
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.拉取單個爭議詳情,其中包含交易號等信息
curl -v -X GET https://api.paypal.com/v1/customer/disputes/{dispute_id} -H "Content-Type: application/json" -H "Authorization: Bearer token"
5.通過ID承擔索賠責任,即退款
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."}'
詳情參考
https://developer.paypal.com/docs/api/customer-disputes/v1/#disputes_list