Skip to main content
To create a dispute, you must open a case, upload supporting documents, and transition it to the READY state. For more detailed information on creating a dispute, see Creating a Dispute.

Opening the dispute case

To open a dispute case, send a POST /cases request with the following fields:
  • original_transaction_token: The clearing transaction token.
  • dispute_amount: The amount in dispute.
  • dispute_reason: A reason code (for example, NOT_AUTHORIZED_CARD_ABSENT for fraud, or CARDHOLDER_DISPUTE for goods not received).
  • The request payload for dispute creation differs depending on the network and dispute reason. The following sample request for a Mastercard cleared transaction is an example of a minimal configuration.
  • The cardholder_contact_date parameter is required for REG_E disputes, but it is not required for this example with minimal configuration.
  • The dispute_reason enum is different from reason_code on a transition which is a network-side identifier.

Sample request body

Sample request

Sample response body

Sample response

Upon creation, the dispute case is assigned the OPEN or OPEN_WITH_ACTION_REQUIRED Marqeta state.

Uploading supporting documents

To upload supporting documents to defend the dispute claim, use POST /cases/{token}/contents. You must upload supporting documents while the case is still in OPEN, OPEN_WITH_ACTION_REQUIRED, or READY states. Once a dispute is submitted to the card network, you can no longer attach documents. For this example in particular, Mastercard requires supporting documents for all dispute claims.

Sample request body

You can upload supporting document file to the disputes API as a binary in an application/json in the Content-Type field, or as part of a multipart/form-data. Examples for both modes follow below.

Sample binary in body request

Sample multipart form request

Sample response body

Sample response

The Marqeta state remains as OPEN or OPEN_WITH_ACTION_REQUIRED.

Verifying the document upload

You can verify that your document was uploaded correctly by sending a request to the GET /cases/{token}/contents endpoint. The response body includes only the list of uploaded documents. However, if you want to download these files, include download_link=true as a query parameter to receive the link in the response body.

Sample request body

Transitioning a dispute case

After you provide all the required case information and upload supporting documents, transition the case to the READY state by performing the REVIEW action. Use POST /cases/{token}/transitions and set the action field value to REVIEW.

Sample request body

Sample request

Sample response body

Sample response

The case transitions to READY, and it is now eligible for submission to the card network.

Withdrawing a dispute voluntarily

You can withdraw a dispute while it is in the OPEN, OPEN_WITH_ACTION_REQUIRED, or READY state by sending a request to the POST /cases/<case_token>/transitions endpoint. This moves the case to a CLOSED state.
You will not be allowed to withdraw disputes once they have been submitted to the card network and assigned the CHARGEBACK_INITIATED state.

Sample request body

Next steps

After successfully navigating a basic dispute lifecycle, you can now begin tailoring your code to your specific use cases. The payloads, responses, and actions you implement will vary significantly depending on the card networks and the regulations your program is subject to.