Test Disputes

DocsCurrentLast updated: May 18th 2022, @ 4:02:27 pm


You can run negative tests on your integration to manage the responses you give to your customers.

Know before you code

  • Before you trigger a simulation, you'll need to you need to get an access token.
  • Use Postman to explore and test PayPal APIs.

Simulation method

To trigger a simulation for the Disputes API, you can use a path parameter in the request URI.

Use a path parameter in the request URI

Trigger or test valueSimulated error response
v1/customer/disputes?disputed_transaction_id=ERRDIS023FORBIDDEN

Request

curl -X GET \
  https://api-m.sandbox.paypal.com/v1/customer/disputes?disputed_transaction_id=ERRDIS023 \
  -H 'Authorization: Bearer <Access Token>' \
  -H 'Content-Type: application/json'

Response

{
    "name": "FORBIDDEN",
    "message": "No permission for the requested operation.",
    "debug_id": "e90ec082e0e4d"
}

Test values

Use the following test values to trigger negative responses for these disputes actions:

Note: Test values are case sensitive.

List disputes

Negative response test values

Use the path parameter in the request URI method to simulate the following error responses at GET /v1/customer/disputes?disputed_transaction_id={transaction_id}.

Trigger or test valueSimulated error response
/v1/customer/disputes?disputed_transaction_id=ERRDIS023FORBIDDEN
/v1/customer/disputes?disputed_transaction_id=ERRDIS024INVALID_RESOURCE_ID
/v1/customer/disputes?disputed_transaction_id=ERRDIS025NOT_ACCEPTABLE
/v1/customer/disputes?disputed_transaction_id=ERRDIS026UNSUPPORTED_MEDIA_TYPE
/v1/customer/disputes?disputed_transaction_id=ERRDIS027RATE_LIMIT_REACHED
/v1/customer/disputes?disputed_transaction_id=ERRDIS028SERVICE_UNAVAILABLE
/v1/customer/disputes?disputed_transaction_id=ERRDIS029INTERNAL_SERVICE_ERROR
/v1/customer/disputes?disputed_transaction_id=ERRDIS030AUTHORIZATION_ERROR
/v1/customer/disputes?disputed_transaction_id=ERRDIS031VALIDATION_ERROR
/v1/customer/disputes?disputed_transaction_id=ERRDIS032VALIDATION_ERROR
/v1/customer/disputes?disputed_transaction_id=ERRDIS033VALIDATION_ERROR
/v1/customer/disputes?disputed_transaction_id=ERRDIS034VALIDATION_ERROR

Show dispute details

Negative response test values

Use the JSON pointer method to simulate the following error responses at GET /v1/customer/disputes/{dispute_id}.

Trigger or test valueSimulated error response
/v1/customer/disputes/ERRDIS015FORBIDDEN
/v1/customer/disputes/ERRDIS016INVALID_RESOURCE_ID
/v1/customer/disputes/ERRDIS017NOT_ACCEPTABLE
/v1/customer/disputes/ERRDIS018UNSUPPORTED_MEDIA_TYPE
/v1/customer/disputes/ERRDIS019RATE_LIMIT_REACHED
/v1/customer/disputes/ERRDIS020SERVICE_UNAVAILABLE
/v1/customer/disputes/ERRDIS021INTERNAL_SERVICE_ERROR
/v1/customer/disputes/ERRDIS022AUTHORIZATION_ERROR

Send message to other party

Negative response test values

Use the path parameter in the request URI method to simulate the following error responses at POST /v1/customer/disputes/{dispute_id}/send-message.

Trigger or test valueSimulated error response
/v1/customer/disputes/ERRDIS091/send-messageFORBIDDEN
/v1/customer/disputes/ERRDIS092/send-messageINVALID_RESOURCE_ID
/v1/customer/disputes/ERRDIS093/send-messageNOT_ACCEPTABLE
/v1/customer/disputes/ERRDIS094/send-messageUNSUPPORTED_MEDIA_TYPE
/v1/customer/disputes/ERRDIS095/send-messageRATE_LIMIT_REACHED
/v1/customer/disputes/ERRDIS096/send-messageSERVICE_UNAVAILABLE
/v1/customer/disputes/ERRDIS097/send-messageINTERNAL_SERVICE_ERROR
/v1/customer/disputes/ERRDIS098/send-messageAUTHORIZATION_ERROR
/v1/customer/disputes/ERRDIS099/send-messageUNPROCESSABLE_ENTITY

Make offer to resolve dispute

Negative response test values

Use the path parameter in the request URI method to simulate the following response at POST /v1/customer/disputes/{dispute_id}/make-offer.

Trigger or test valueSimulated error response
/v1/customer/disputes/ERRDIS100/make-offerFORBIDDEN
/v1/customer/disputes/ERRDIS101/make-offerINVALID_RESOURCE_ID
/v1/customer/disputes/ERRDIS102/make-offerNOT_ACCEPTABLE
/v1/customer/disputes/ERRDIS103/make-offerUNSUPPORTED_MEDIA_TYPE
/v1/customer/disputes/ERRDIS104/make-offerRATE_LIMIT_REACHED
/v1/customer/disputes/ERRDIS105/make-offerSERVICE_UNAVAILABLE
/v1/customer/disputes/ERRDIS106/make-offerINTERNAL_SERVICE_ERROR
/v1/customer/disputes/ERRDIS107/make-offerAUTHORIZATION_ERROR
/v1/customer/disputes/ERRDIS108/make-offerUNPROCESSABLE_ENTITY

Escalate dispute to claim

Negative response test values

Use the path parameter in the request URI method to simulate the following error responses at POST /v1/customer/disputes/{dispute_id}/escalate.

Trigger or test valueSimulated response
/v1/customer/disputes/ERRDIS082/escalateFORBIDDEN
/v1/customer/disputes/ERRDIS083/escalateINVALID_RESOURCE_ID
/v1/customer/disputes/ERRDIS084/escalateNOT_ACCEPTABLE
/v1/customer/disputes/ERRDIS085/escalateUNSUPPORTED_MEDIA_TYPE
/v1/customer/disputes/ERRDIS086/escalateRATE_LIMIT_REACHED
/v1/customer/disputes/ERRDIS087/escalateSERVICE_UNAVAILABLE
/v1/customer/disputes/ERRDIS088/escalateINTERNAL_SERVICE_ERROR
/v1/customer/disputes/ERRDIS089/escalateAUTHORIZATION_ERROR
/v1/customer/disputes/ERRDIS090/escalateUNPROCESSABLE_ENTITY

Provide evidence

Negative response test values

Use the path parameter in the request URI method to simulate the following error responses at POST /v1/customer/disputes/{dispute_id}/provide-evidence .

Trigger or test valueSimulated response
/v1/customer/disputes/ERRDIS035/provide-evidenceFORBIDDEN
/v1/customer/disputes/ERRDIS036/provide-evidenceINVALID_RESOURCE_ID
/v1/customer/disputes/ERRDIS037/provide-evidenceNOT_ACCEPTABLE
/v1/customer/disputes/ERRDIS038/provide-evidenceUNSUPPORTED_MEDIA_TYPE
/v1/customer/disputes/ERRDIS039/provide-evidenceRATE_LIMIT_REACHED
/v1/customer/disputes/ERRDIS040/provide-evidenceSERVICE_UNAVAILABLE
/v1/customer/disputes/ERRDIS041/provide-evidenceINTERNAL_SERVICE_ERROR
/v1/customer/disputes/ERRDIS042/provide-evidenceAUTHORIZATION_ERROR
/v1/customer/disputes/ERRDIS043/provide-evidenceUNPROCESSABLE_ENTITY
/v1/customer/disputes/ERRDIS044/provide-evidenceVALIDATION_ERROR
/v1/customer/disputes/ERRDIS045/provide-evidenceVALIDATION_ERROR
/v1/customer/disputes/ERRDIS046/provide-evidenceVALIDATION_ERROR
/v1/customer/disputes/ERRDIS047/provide-evidenceVALIDATION_ERROR
/v1/customer/disputes/ERRDIS048/provide-evidenceVALIDATION_ERROR
/v1/customer/disputes/ERRDIS049/provide-evidenceVALIDATION_ERROR
/v1/customer/disputes/ERRDIS050/provide-evidenceVALIDATION_ERROR

Accept claim

Negative response test values

Use the path parameter in the request URI method to simulate the following response at POST /v1/customer/disputes/{dispute_id}/accept-claim.

Trigger or test valueSimulated response
/v1/customer/disputes/ERRDIS051/accept-claimFORBIDDEN
/v1/customer/disputes/ERRDIS052/accept-claimINVALID_RESOURCE_ID
/v1/customer/disputes/ERRDIS053/accept-claimNOT_ACCEPTABLE
/v1/customer/disputes/ERRDIS054/accept-claimUNSUPPORTED_MEDIA_TYPE
/v1/customer/disputes/ERRDIS055/accept-claimRATE_LIMIT_REACHED
/v1/customer/disputes/ERRDIS056/accept-claimSERVICE_UNAVAILABLE
/v1/customer/disputes/ERRDIS057/accept-claimINTERNAL_SERVICE_ERROR
/v1/customer/disputes/ERRDIS058/accept-claimAUTHORIZATION_ERROR
/v1/customer/disputes/ERRDIS059/accept-claimUNPROCESSABLE_ENTITY
/v1/customer/disputes/ERRDIS060/accept-claimVALIDATION_ERROR
/v1/customer/disputes/ERRDIS061/accept-claimVALIDATION_ERROR
/v1/customer/disputes/ERRDIS062/accept-claimVALIDATION_ERROR
/v1/customer/disputes/ERRDIS063/accept-claimVALIDATION_ERROR
/v1/customer/disputes/ERRDIS064/accept-claimVALIDATION_ERROR
/v1/customer/disputes/ERRDIS065/accept-claimUNPROCESSABLE_ENTITY

Acknowledge return item

Negative response test values

Use the path parameter in the request URI method to simulate the following response at POST /v1/customer/disputes/{dispute_id}/acknowledge-return-item.

Trigger or test valueSimulated response
/v1/customer/disputes/ERRDIS109/acknowledge-return-itemFORBIDDEN
/v1/customer/disputes/ERRDIS110/acknowledge-return-itemINVALID_RESOURCE_ID
/v1/customer/disputes/ERRDIS111/acknowledge-return-itemNOT_ACCEPTABLE
/v1/customer/disputes/ERRDIS112/acknowledge-return-itemUNSUPPORTED_MEDIA_TYPE
/v1/customer/disputes/ERRDIS113/acknowledge-return-itemRATE_LIMIT_REACHED
/v1/customer/disputes/ERRDIS114/acknowledge-return-itemSERVICE_UNAVAILABLE
/v1/customer/disputes/ERRDIS115/acknowledge-return-itemINTERNAL_SERVICE_ERROR
/v1/customer/disputes/ERRDIS116/acknowledge-return-itemAUTHORIZATION_ERROR
/v1/customer/disputes/ERRDIS117/acknowledge-return-itemUNPROCESSABLE_ENTITY

Appeal dispute

Negative response test values

Use the path parameter in the request URI method to simulate the following response at POST /v1/customer/disputes/{dispute_id}/appeal.

Trigger or test valueSimulated response
/v1/customer/disputes/ERRDIS066/appealFORBIDDEN
/v1/customer/disputes/ERRDIS067/appealINVALID_RESOURCE_ID
/v1/customer/disputes/ERRDIS068/appealNOT_ACCEPTABLE
/v1/customer/disputes/ERRDIS069/appealUNSUPPORTED_MEDIA_TYPE
/v1/customer/disputes/ERRDIS070/appealRATE_LIMIT_REACHED
/v1/customer/disputes/ERRDIS071/appealSERVICE_UNAVAILABLE
/v1/customer/disputes/ERRDIS072/appealINTERNAL_SERVICE_ERROR
/v1/customer/disputes/ERRDIS073/appealAUTHORIZATION_ERROR
/v1/customer/disputes/ERRDIS074/appealUNPROCESSABLE_ENTITY
/v1/customer/disputes/ERRDIS075/appealVALIDATION_ERROR
/v1/customer/disputes/ERRDIS076/appealVALIDATION_ERROR
/v1/customer/disputes/ERRDIS077/appealVALIDATION_ERROR
/v1/customer/disputes/ERRDIS078/appealVALIDATION_ERROR
/v1/customer/disputes/ERRDIS079/appealVALIDATION_ERROR
/v1/customer/disputes/ERRDIS080/appealVALIDATION_ERROR
/v1/customer/disputes/ERRDIS081/appealVALIDATION_ERROR