API reference

Disputes

Knox answers these operations with the same requests and responses as Stripe's API. Authenticate with your secret key, Authorization: Bearer sk_test_..., from your server, and send form-encoded bodies. Test mode only: live processing is currently disabled.

List all disputes

GET/v1/disputes

Returns a list of your disputes.

Query parameters

  • chargestring

    Only return disputes associated to the charge specified by this charge ID.

  • createdobject | integer

    Only return disputes that were created during the given date interval.

    Show 4 child parameters
    • gtinteger
    • gteinteger
    • ltinteger
    • lteinteger
  • ending_beforestring

    A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

  • expandarray of strings

    Specifies which fields in the response should be expanded.

  • limitinteger

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • payment_intentstring

    Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID.

  • starting_afterstring

    A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Returns

A list of dispute objects.

GET /v1/disputes
curl -G https://api.knoxapi.com/v1/disputes \
  -H "Authorization: Bearer $KNOX_SECRET_KEY" \
  --data-urlencode limit=3
Response
{
  "object": "list",
  "url": "/v1/disputes",
  "has_more": false,
  "data": [
    {
      "amount": 1000,
      "balance_transactions": [],
      "charge": "ch_1PgafuB7WZ01zgkWXYmPNZs8",
      "created": 1234567890,
      "currency": "usd",
      "evidence": {
        "access_activity_log": null,
        "billing_address": null,
        "cancellation_policy": null,
        "cancellation_policy_disclosure": null,
        "cancellation_rebuttal": null,
        "customer_communication": null,
        "customer_email_address": null,
        "customer_name": null,
        "customer_purchase_ip": null,
        "customer_signature": null,
        "duplicate_charge_documentation": null,
        "duplicate_charge_explanation": null,
        "duplicate_charge_id": null,
        "product_description": null,
        "receipt": null,
        "refund_policy": null,
        "refund_policy_disclosure": null,
        "refund_refusal_explanation": null,
        "service_date": null,
        "service_documentation": null,
        "shipping_address": null,
        "shipping_carrier": null,
        "shipping_date": null,
        "shipping_documentation": null,
        "shipping_tracking_number": null,
        "uncategorized_file": null,
        "uncategorized_text": null,
        "enhanced_evidence": {}
      },
      "evidence_details": {
        "due_by": 1723679999,
        "has_evidence": false,
        "past_due": false,
        "submission_count": 0,
        "enhanced_eligibility": {}
      },
      "id": "dp_1Pgc71B7WZ01zgkWMevJiAUx",
      "is_charge_refundable": true,
      "livemode": false,
      "metadata": {},
      "object": "dispute",
      "payment_intent": null,
      "payment_method_details": {
        "card": {
          "brand": "visa",
          "case_type": "inquiry",
          "network_reason_code": "10.4",
          "network": "visa"
        },
        "type": "card"
      },
      "reason": "general",
      "status": "warning_needs_response",
      "enhanced_eligibility_types": [
        "visa_compelling_evidence_3"
      ]
    }
  ]
}

Update a dispute

POST/v1/disputes/{dispute}

When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically. Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

Path parameters

  • disputestringRequired

Body parameters

  • evidenceobject

    Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.

    Show 28 child parameters
    • access_activity_logstring
    • billing_addressstring
    • cancellation_policystring
    • cancellation_policy_disclosurestring
    • cancellation_rebuttalstring
    • customer_communicationstring
    • customer_email_addressstring
    • customer_namestring
    • customer_purchase_ipstring
    • customer_signaturestring
    • duplicate_charge_documentationstring
    • duplicate_charge_explanationstring
    • duplicate_charge_idstring
    • enhanced_evidenceobject
      Show 3 child parameters
    • product_descriptionstring
    • receiptstring
    • refund_policystring
    • refund_policy_disclosurestring
    • refund_refusal_explanationstring
    • service_datestring
    • service_documentationstring
    • shipping_addressstring
    • shipping_carrierstring
    • shipping_datestring
    • shipping_documentationstring
    • shipping_tracking_numberstring
    • uncategorized_filestring
    • uncategorized_textstring
  • expandarray of strings

    Specifies which fields in the response should be expanded.

  • metadataobject

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

  • submitboolean

    Whether to immediately submit evidence to the bank. If false, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to true (the default).

Returns

The dispute object.

POST /v1/disputes/{dispute}
curl https://api.knoxapi.com/v1/disputes/dp_1Pgc71B7WZ01zgkWMevJiAUx \
  -H "Authorization: Bearer $KNOX_SECRET_KEY" \
  -d "metadata[order_id]=6735"
Response
{
  "amount": 1000,
  "balance_transactions": [],
  "charge": "ch_1PgafuB7WZ01zgkWXYmPNZs8",
  "created": 1234567890,
  "currency": "usd",
  "evidence": {
    "access_activity_log": null,
    "billing_address": null,
    "cancellation_policy": null,
    "cancellation_policy_disclosure": null,
    "cancellation_rebuttal": null,
    "customer_communication": null,
    "customer_email_address": null,
    "customer_name": null,
    "customer_purchase_ip": null,
    "customer_signature": null,
    "duplicate_charge_documentation": null,
    "duplicate_charge_explanation": null,
    "duplicate_charge_id": null,
    "product_description": null,
    "receipt": null,
    "refund_policy": null,
    "refund_policy_disclosure": null,
    "refund_refusal_explanation": null,
    "service_date": null,
    "service_documentation": null,
    "shipping_address": null,
    "shipping_carrier": null,
    "shipping_date": null,
    "shipping_documentation": null,
    "shipping_tracking_number": null,
    "uncategorized_file": null,
    "uncategorized_text": null,
    "enhanced_evidence": {}
  },
  "evidence_details": {
    "due_by": 1723679999,
    "has_evidence": false,
    "past_due": false,
    "submission_count": 0,
    "enhanced_eligibility": {}
  },
  "id": "dp_1Pgc71B7WZ01zgkWMevJiAUx",
  "is_charge_refundable": true,
  "livemode": false,
  "metadata": {},
  "object": "dispute",
  "payment_intent": null,
  "payment_method_details": {
    "card": {
      "brand": "visa",
      "case_type": "inquiry",
      "network_reason_code": "10.4",
      "network": "visa"
    },
    "type": "card"
  },
  "reason": "general",
  "status": "warning_needs_response",
  "enhanced_eligibility_types": [
    "visa_compelling_evidence_3"
  ]
}

Retrieve a dispute

GET/v1/disputes/{dispute}

Retrieves the dispute with the given ID.

Path parameters

  • disputestringRequired

Query parameters

  • expandarray of strings

    Specifies which fields in the response should be expanded.

Returns

The dispute object.

GET /v1/disputes/{dispute}
curl https://api.knoxapi.com/v1/disputes/dp_1Pgc71B7WZ01zgkWMevJiAUx \
  -H "Authorization: Bearer $KNOX_SECRET_KEY"
Response
{
  "amount": 1000,
  "balance_transactions": [],
  "charge": "ch_1PgafuB7WZ01zgkWXYmPNZs8",
  "created": 1234567890,
  "currency": "usd",
  "evidence": {
    "access_activity_log": null,
    "billing_address": null,
    "cancellation_policy": null,
    "cancellation_policy_disclosure": null,
    "cancellation_rebuttal": null,
    "customer_communication": null,
    "customer_email_address": null,
    "customer_name": null,
    "customer_purchase_ip": null,
    "customer_signature": null,
    "duplicate_charge_documentation": null,
    "duplicate_charge_explanation": null,
    "duplicate_charge_id": null,
    "product_description": null,
    "receipt": null,
    "refund_policy": null,
    "refund_policy_disclosure": null,
    "refund_refusal_explanation": null,
    "service_date": null,
    "service_documentation": null,
    "shipping_address": null,
    "shipping_carrier": null,
    "shipping_date": null,
    "shipping_documentation": null,
    "shipping_tracking_number": null,
    "uncategorized_file": null,
    "uncategorized_text": null,
    "enhanced_evidence": {}
  },
  "evidence_details": {
    "due_by": 1723679999,
    "has_evidence": false,
    "past_due": false,
    "submission_count": 0,
    "enhanced_eligibility": {}
  },
  "id": "dp_1Pgc71B7WZ01zgkWMevJiAUx",
  "is_charge_refundable": true,
  "livemode": false,
  "metadata": {},
  "object": "dispute",
  "payment_intent": null,
  "payment_method_details": {
    "card": {
      "brand": "visa",
      "case_type": "inquiry",
      "network_reason_code": "10.4",
      "network": "visa"
    },
    "type": "card"
  },
  "reason": "general",
  "status": "warning_needs_response",
  "enhanced_eligibility_types": [
    "visa_compelling_evidence_3"
  ]
}

Close a dispute

POST/v1/disputes/{dispute}/close

Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute (accepting it), acknowledging it as lost. The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

Path parameters

  • disputestringRequired

Body parameters

  • expandarray of strings

    Specifies which fields in the response should be expanded.

Returns

The dispute object.

POST /v1/disputes/{dispute}/close
curl -X POST https://api.knoxapi.com/v1/disputes/dp_1Pgc71B7WZ01zgkWMevJiAUx/close \
  -H "Authorization: Bearer $KNOX_SECRET_KEY"
Response
{
  "amount": 1000,
  "balance_transactions": [],
  "charge": "ch_1PgafuB7WZ01zgkWXYmPNZs8",
  "created": 1234567890,
  "currency": "usd",
  "evidence": {
    "access_activity_log": null,
    "billing_address": null,
    "cancellation_policy": null,
    "cancellation_policy_disclosure": null,
    "cancellation_rebuttal": null,
    "customer_communication": null,
    "customer_email_address": null,
    "customer_name": null,
    "customer_purchase_ip": null,
    "customer_signature": null,
    "duplicate_charge_documentation": null,
    "duplicate_charge_explanation": null,
    "duplicate_charge_id": null,
    "product_description": null,
    "receipt": null,
    "refund_policy": null,
    "refund_policy_disclosure": null,
    "refund_refusal_explanation": null,
    "service_date": null,
    "service_documentation": null,
    "shipping_address": null,
    "shipping_carrier": null,
    "shipping_date": null,
    "shipping_documentation": null,
    "shipping_tracking_number": null,
    "uncategorized_file": null,
    "uncategorized_text": null,
    "enhanced_evidence": {}
  },
  "evidence_details": {
    "due_by": 1723679999,
    "has_evidence": false,
    "past_due": false,
    "submission_count": 0,
    "enhanced_eligibility": {}
  },
  "id": "dp_1Pgc71B7WZ01zgkWMevJiAUx",
  "is_charge_refundable": true,
  "livemode": false,
  "metadata": {},
  "object": "dispute",
  "payment_intent": null,
  "payment_method_details": {
    "card": {
      "brand": "visa",
      "case_type": "inquiry",
      "network_reason_code": "10.4",
      "network": "visa"
    },
    "type": "card"
  },
  "reason": "general",
  "status": "warning_needs_response",
  "enhanced_eligibility_types": [
    "visa_compelling_evidence_3"
  ]
}

Operations and schemas come from the pinned Stripe OpenAPI specification (MIT); response examples from its fixtures. Nested object definitions and enums are in the complete specification.