openapi: 3.0.0
info:
title: Stripe Disputes API
description: >-
A dispute occurs when a customer questions your charge with their card
issuer. When this happens, you have the opportunity to respond to the
dispute with evidence that shows that the charge is legitimate.
contact:
email: dev-platform@stripe.com
name: Stripe Dev Platform Team
url: https://stripe.com
termsOfService: https://stripe.com/us/terms/
version: '2023-10-16'
x-stripeSpecFilename: spec3
security:
- basicAuth: []
- bearerAuth: []
servers:
- url: https://api.stripe.com/
paths:
/v1/disputes:
get:
description:
Returns a list of your disputes.
operationId: getDisputes
parameters:
- description: >-
Only return disputes associated to the charge specified by this
charge ID.
in: query
name: charge
required: false
schema:
maxLength: 5000
type: string
style: form
- explode: true
in: query
name: created
required: false
schema:
anyOf:
- properties:
gt:
type: integer
gte:
type: integer
lt:
type: integer
lte:
type: integer
title: range_query_specs
type: object
- type: integer
style: deepObject
- description: >-
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.
in: query
name: ending_before
required: false
schema:
maxLength: 5000
type: string
style: form
- description: Specifies which fields in the response should be expanded.
explode: true
in: query
name: expand
required: false
schema:
items:
maxLength: 5000
type: string
type: array
style: deepObject
- description: >-
A limit on the number of objects to be returned. Limit can range
between 1 and 100, and the default is 10.
in: query
name: limit
required: false
schema:
type: integer
style: form
- description: >-
Only return disputes associated to the PaymentIntent specified by
this PaymentIntent ID.
in: query
name: payment_intent
required: false
schema:
maxLength: 5000
type: string
style: form
- description: >-
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.
in: query
name: starting_after
required: false
schema:
maxLength: 5000
type: string
style: form
requestBody:
content:
application/x-www-form-urlencoded:
encoding: {}
schema:
additionalProperties: false
$ref: '#/components/schemas/GetDisputesRequest'
required: false
responses:
'200':
content:
application/json:
schema:
description: ''
x-expandableFields:
- data
$ref: '#/components/schemas/DisputeList'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
summary: Stripe Get Disputes
x-api-evangelist-processing:
GenerateOperationSummariesFromPath: true
PascalCaseOperationSummaries: true
CaselCaseOperationIds: true
ChooseTags: true
tags:
- Disputes
- Get
/v1/disputes/{dispute}:
get:
description: Retrieves the dispute with the given ID.
operationId: getDisputesDispute
parameters:
- in: path
name: dispute
required: true
schema:
maxLength: 5000
type: string
style: simple
- description: Specifies which fields in the response should be expanded.
explode: true
in: query
name: expand
required: false
schema:
items:
maxLength: 5000
type: string
type: array
style: deepObject
requestBody:
content:
application/x-www-form-urlencoded:
encoding: {}
schema:
additionalProperties: false
$ref: '#/components/schemas/GetDisputesDisputeRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/dispute'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
summary: Stripe Get Disputes Dispute
x-api-evangelist-processing:
GenerateOperationSummariesFromPath: true
PascalCaseOperationSummaries: true
CaselCaseOperationIds: true
ChooseTags: true
tags:
- Dispute
- Disputes
- Get
post:
description: >-
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.
operationId: postDisputesDispute
parameters:
- in: path
name: dispute
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
evidence:
explode: true
style: deepObject
expand:
explode: true
style: deepObject
metadata:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostDisputesDisputeRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/dispute'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
summary: Stripe Post Disputes Dispute
x-api-evangelist-processing:
GenerateOperationSummariesFromPath: true
PascalCaseOperationSummaries: true
CaselCaseOperationIds: true
ChooseTags: true
tags:
- Dispute
- Disputes
- Post
/v1/disputes/{dispute}/close:
post:
description: >-
Closing the dispute for a charge indicates that you do not have any
evidence to submit and are essentially dismissing the dispute,
acknowledging it as lost.
The status of the dispute will change from
needs_response to lost. Closing a dispute
is irreversible.
operationId: postDisputesDisputeClose
parameters:
- in: path
name: dispute
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostDisputesDisputeCloseRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/dispute'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
summary: Stripe Post Disputes Dispute Close
x-api-evangelist-processing:
GenerateOperationSummariesFromPath: true
PascalCaseOperationSummaries: true
CaselCaseOperationIds: true
ChooseTags: true
tags:
- Close
- Dispute
- Disputes
- Post
components:
schemas:
error:
description: An error response from the Stripe API
properties:
error:
$ref: '#/components/schemas/api_errors'
required:
- error
type: object
dispute:
description: >-
A dispute occurs when a customer questions your charge with their card
issuer.
When this happens, you have the opportunity to respond to the dispute
with
evidence that shows that the charge is legitimate.
Related guide: [Disputes and fraud](https://stripe.com/docs/disputes)
properties:
amount:
description: >-
Disputed amount. Usually the amount of the charge, but it can differ
(usually because of currency fluctuation or because only part of the
order is disputed).
type: integer
balance_transactions:
description: >-
List of zero, one, or two balance transactions that show funds
withdrawn and reinstated to your Stripe account as a result of this
dispute.
items:
$ref: '#/components/schemas/balance_transaction'
type: array
charge:
anyOf:
- maxLength: 5000
type: string
- $ref: '#/components/schemas/charge'
description: ID of the charge that's disputed.
x-expansionResources:
oneOf:
- $ref: '#/components/schemas/charge'
created:
description: >-
Time at which the object was created. Measured in seconds since the
Unix epoch.
format: unix-time
type: integer
currency:
description: >-
Three-letter [ISO currency
code](https://www.iso.org/iso-4217-currency-codes.html), in
lowercase. Must be a [supported
currency](https://stripe.com/docs/currencies).
type: string
evidence:
$ref: '#/components/schemas/dispute_evidence'
evidence_details:
$ref: '#/components/schemas/dispute_evidence_details'
id:
description: Unique identifier for the object.
maxLength: 5000
type: string
is_charge_refundable:
description: >-
If true, it's still possible to refund the disputed payment. After
the payment has been fully refunded, no further funds are withdrawn
from your Stripe account as a result of this dispute.
type: boolean
livemode:
description: >-
Has the value `true` if the object exists in live mode or the value
`false` if the object exists in test mode.
type: boolean
metadata:
additionalProperties:
maxLength: 500
type: string
description: >-
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that
you can attach to an object. This can be useful for storing
additional information about the object in a structured format.
type: object
object:
description: >-
String representing the object's type. Objects of the same type
share the same value.
enum:
- dispute
type: string
payment_intent:
anyOf:
- maxLength: 5000
type: string
- $ref: '#/components/schemas/payment_intent'
description: ID of the PaymentIntent that's disputed.
nullable: true
x-expansionResources:
oneOf:
- $ref: '#/components/schemas/payment_intent'
payment_method_details:
$ref: '#/components/schemas/dispute_payment_method_details'
reason:
description: >-
Reason given by cardholder for dispute. Possible values are
`bank_cannot_process`, `check_returned`, `credit_not_processed`,
`customer_initiated`, `debit_not_authorized`, `duplicate`,
`fraudulent`, `general`, `incorrect_account_details`,
`insufficient_funds`, `product_not_received`,
`product_unacceptable`, `subscription_canceled`, or `unrecognized`.
Learn more about [dispute
reasons](https://stripe.com/docs/disputes/categories).
maxLength: 5000
type: string
status:
description: >-
Current status of dispute. Possible values are
`warning_needs_response`, `warning_under_review`, `warning_closed`,
`needs_response`, `under_review`, `won`, or `lost`.
enum:
- lost
- needs_response
- under_review
- warning_closed
- warning_needs_response
- warning_under_review
- won
type: string
required:
- amount
- balance_transactions
- charge
- created
- currency
- evidence
- evidence_details
- id
- is_charge_refundable
- livemode
- metadata
- object
- reason
- status
title: Dispute
type: object
x-expandableFields:
- balance_transactions
- charge
- evidence
- evidence_details
- payment_intent
- payment_method_details
x-resourceId: dispute
GetDisputesRequest:
type: object
properties: {}
DisputeList:
type: object
required:
- data
- has_more
- object
- url
properties:
data:
items:
$ref: '#/components/schemas/dispute'
type: array
has_more:
description: >-
True if this list has another page of items after this one that can
be fetched.
type: boolean
object:
description: >-
String representing the object's type. Objects of the same type
share the same value. Always has the value `list`.
enum:
- list
type: string
url:
description: The URL where this list can be accessed.
maxLength: 5000
pattern: ^/v1/disputes
type: string
GetDisputesDisputeRequest:
type: object
properties: {}
PostDisputesDisputeRequest:
type: object
properties:
evidence:
description: >-
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.
properties:
access_activity_log:
maxLength: 20000
type: string
billing_address:
maxLength: 5000
type: string
cancellation_policy:
type: string
cancellation_policy_disclosure:
maxLength: 20000
type: string
cancellation_rebuttal:
maxLength: 20000
type: string
customer_communication:
type: string
customer_email_address:
maxLength: 5000
type: string
customer_name:
maxLength: 5000
type: string
customer_purchase_ip:
maxLength: 5000
type: string
customer_signature:
type: string
duplicate_charge_documentation:
type: string
duplicate_charge_explanation:
maxLength: 20000
type: string
duplicate_charge_id:
maxLength: 5000
type: string
product_description:
maxLength: 20000
type: string
receipt:
type: string
refund_policy:
type: string
refund_policy_disclosure:
maxLength: 20000
type: string
refund_refusal_explanation:
maxLength: 20000
type: string
service_date:
maxLength: 5000
type: string
service_documentation:
type: string
shipping_address:
maxLength: 5000
type: string
shipping_carrier:
maxLength: 5000
type: string
shipping_date:
maxLength: 5000
type: string
shipping_documentation:
type: string
shipping_tracking_number:
maxLength: 5000
type: string
uncategorized_file:
type: string
uncategorized_text:
maxLength: 20000
type: string
title: dispute_evidence_params
type: object
expand:
description: Specifies which fields in the response should be expanded.
items:
maxLength: 5000
type: string
type: array
metadata:
anyOf:
- additionalProperties:
type: string
type: object
- enum:
- ''
type: string
description: >-
Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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`.
submit:
description: >-
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).
type: boolean
PostDisputesDisputeCloseRequest:
type: object
properties:
expand:
description: Specifies which fields in the response should be expanded.
items:
maxLength: 5000
type: string
type: array
securitySchemes:
basicAuth:
description: >-
Basic HTTP authentication. Allowed headers-- Authorization: Basic
| Authorization: Basic
scheme: basic
type: http
bearerAuth:
bearerFormat: auth-scheme
description: >-
Bearer HTTP authentication. Allowed headers-- Authorization: Bearer
scheme: bearer
type: http
tags:
- name: Close
- name: Dispute
- name: Disputes
- name: Get
- name: Post