# Querying the /v1/disputes endpoint

**URL:** <https://community.rapyd.net/t/querying-the-v1-disputes-endpoint/1266>\
**Category:** 🙋🏽‍♀️🙋🏽‍♂️ Ask Questions\
**Created:** [October 28, 2021, 4:23am UTC](https://community.rapyd.net/t/querying-the-v1-disputes-endpoint/1266 "2021-10-28T04:23:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/richard/32/1381_2.png) [@Richard](https://community.rapyd.net/u/Richard)\
**Post date:** [October 28, 2021, 4:23am UTC](https://community.rapyd.net/t/querying-the-v1-disputes-endpoint/1266/1 "2021-10-28T04:23:20Z")

</div>

Hey All,

When querying the dispute-api (/v1/disputes) to list all disputes, how do I get payment and/or customer information included in the JSON reply ?

I’ve tried guessing at adding “&payment”, “&payment=true”, “customer”, “&customer=true” to the query string but that didn’t yield anything.

When I query for a payment & the payment is disputed the dispute JSON contains “original\_transaction\_id”: “payment\_xxxxxx”, however when I list disputes the “original\_transaction\_id” field is not present.

Thanks,

Cheers  
Richard

---

<div class="post-metadata">

**Author:** ![Legato](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/legato/32/41_2.png) [@Legato](https://community.rapyd.net/u/Legato)\
**Post date:** [October 31, 2021, 10:05am UTC](https://community.rapyd.net/t/querying-the-v1-disputes-endpoint/1266/2 "2021-10-31T10:05:27Z")

</div>

Hi Richard,  
Welcome to the Rapyd developer community!  
Please try this:

First, list the all the disputes via the  
`Get {base_uri}/disputes` request.

In the response look for the dispute you are interested in, and copy its token. This is the value that begins with the string **dispute\_**.

Then, retrieve specific information on the dispute via the Retrieve Dispute request:  
`Get {base_uri}/dispute/{dispute}`.

Example for retrieving information on a specific dispute:  
Request `URL: GET https://sandboxapi.rapyd.net/v1/dispute/dispute_be1aaf8405b21c26fd054bf25a8bcd5b`

```auto
{
    "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "7b934132-227e-458e-b204-1e6992f9038f"
    },
    "data": {
        "id": "1d4c092e-6cef-4126-b3d8-8794456799d1",
        "token": "dispute_be1aaf8405b21c26fd054bf25a8bcd5b",
        "status": "ACT",
        "amount": 26.53,
        "currency": "USD",
        "dispute_category": "Cardholder Dispute",
        "dispute_reason_description": "Credit not processed",
        "original_transaction_currency": "USD",
        "original_transaction_amount": 26.53,
        "original_dispute_amount": 26.53,
        "original_dispute_currency": "USD",
        "original_transaction_id": "payment_b6b3915ceaaa37ec00531cd3baa36c53",
        "ewallet_id": null,
        "central_processing_date": null,
        "created_at": 1633004268,
        "updated_at": 1633004268,
        "due_date": 1633781868.962,
        "payment_method": {
            "id": "card_c80ce71bd02d6f0ed7d4f4363dee0e62",
            "type": "fr_visa_card",
            "category": "card",
            "metadata": null,
            "image": "",
            "webhook_url": "",
            "supporting_documentation": "",
            "next_action": "not_applicable",
            "name": "John Doe",
            "last4": "9043",
            "acs_check": "unchecked",
            "cvv_check": "unchecked",
            "bin_details": {
                "type": null,
                "brand": null,
                "country": null,
                "bin_number": "537450"
            },
            "expiration_year": "21",
            "expiration_month": "11",
            "fingerprint_token": "ocfp_069d543df19c1a9234462660967bc5b9"
        },
        "rate": 1,
        "evidence": null
    }
}

```

If necessary, use the [Retrieve Payment](https://docs.rapyd.net/build-with-rapyd/reference/payment-object#retrieve-payment) request to get more information on the payment (The ID of the payment can be found in the value of the `original_transaction_id` field.)

Hope this helps.

---

<div class="post-metadata">

**Author:** ![Richard](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/richard/32/1381_2.png) [@Richard](https://community.rapyd.net/u/Richard)\
**Post date:** [November 1, 2021, 4:19am UTC](https://community.rapyd.net/t/querying-the-v1-disputes-endpoint/1266/3 "2021-11-01T04:19:47Z")

</div>

Hey @Legato,

Fantastic. All working. Thanks heaps. 🙂👍

One more question - Does the /v1/disputes endpoint also support starting\_after&ending\_before query params to fetch the next set of disputes ?

I’ve tried [https://sandboxapi.rapyd.net:443/v1/disputes?limit=3&ending\_before=token](https://sandboxapi.rapyd.net:443/v1/disputes?limit=3&ending_before=token) (dispute\_12873…) and [https://sandboxapi.rapyd.net:443/v1/disputes?limit=3&ending\_before=id](https://sandboxapi.rapyd.net:443/v1/disputes?limit=3&ending_before=id) (UUID) and neither seems to fetch the next set as it does for customers and payments. It just fetches the same initial set again.

Thanks.

Cheers  
Richard

---

<div class="post-metadata">

**Author:** ![Legato](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/legato/32/41_2.png) [@Legato](https://community.rapyd.net/u/Legato)\
**Post date:** [November 1, 2021, 11:40am UTC](https://community.rapyd.net/t/querying-the-v1-disputes-endpoint/1266/4 "2021-11-01T11:40:05Z")

</div>

Great! Glad to hear it worked out!  
Regarding filtering options for listing disputes, this is currently not available, but it is being planned for a future release.

Thanks

---

<div class="post-metadata">

**Author:** ![Richard](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/richard/32/1381_2.png) [@Richard](https://community.rapyd.net/u/Richard)\
**Post date:** [November 3, 2021, 12:03am UTC](https://community.rapyd.net/t/querying-the-v1-disputes-endpoint/1266/5 "2021-11-03T00:03:09Z")

</div>

Hey @Legato - Great. Thanks for the info. Does the {base\_uri}/disputes query simply return a list of all disputes then ?

Cheers  
Richard

---

<div class="post-metadata">

**Author:** ![Legato](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/legato/32/41_2.png) [@Legato](https://community.rapyd.net/u/Legato)\
**Post date:** [November 3, 2021, 10:40am UTC](https://community.rapyd.net/t/querying-the-v1-disputes-endpoint/1266/6 "2021-11-03T10:40:48Z")

</div>

Hi @Richard,  
Yes, the response lists the disputes in chronological order.  
You can also use the sandbox to simulate the creation of additional disputes. See this [link](https://docs.rapyd.net/build-with-rapyd/reference/testing-for-payments-api#simulating-cardholder-disputes). The newly created disputes will then appear in the response of ‘List Disputes’.

Thanks

---

<div class="post-metadata">

**Author:** ![Richard](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/richard/32/1381_2.png) [@Richard](https://community.rapyd.net/u/Richard)\
**Post date:** [November 3, 2021, 11:10pm UTC](https://community.rapyd.net/t/querying-the-v1-disputes-endpoint/1266/7 "2021-11-03T23:10:22Z")

</div>

Awesome. Thanks so much for the info @Legato 🙂 👍

---

<div class="post-metadata">

**Author:** ![Legato](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/legato/32/41_2.png) [@Legato](https://community.rapyd.net/u/Legato)\
**Post date:** [November 23, 2021, 4:16pm UTC](https://community.rapyd.net/t/querying-the-v1-disputes-endpoint/1266/8 "2021-11-23T16:16:03Z")

</div>

Please note that the updated endpoint for the request to retrieve specific information on the dispute is:  
`Get {base_uri}/disputes/{dispute}`

Thanks

---

<div class="post-metadata">

**Author:** ![Richard](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/richard/32/1381_2.png) [@Richard](https://community.rapyd.net/u/Richard)\
**Post date:** [December 1, 2021, 12:38am UTC](https://community.rapyd.net/t/querying-the-v1-disputes-endpoint/1266/9 "2021-12-01T00:38:32Z")

</div>

Hey @Legato,

Great. Thanks for looping me in. Appreciate it. 👍

Cheers  
r
