Receiving and retrieving a dispute

In this section you can learn about:

When a customer opens up a dispute, Clearpay call the webhook with webhook_event_type = created.
Merchants can use the Get Dispute endpoint below to get the detailed information of the dispute.

Receiving disputes

Get Dispute - Endpoint

GET https://global-api.afterpay.com/v2/disputes/{dispute_id}

Connection Timeouts

TimeoutTime (seconds)
OPEN10
Read 20

Request Headers

HeaderTypeDefault Value
User-AgentStringClearpay Online API Simulator
AcceptStringapplication/json

Request Parameters

Field nameData typeDescription
dispute_id String(Required) Dispute identifier

Response

Field nameData typeDescription
disputeDisputeObjectThe updated dispute object

Dispute Object

Field nameData typeDescription
idStringDispute identifier.
orderStringThe token of the order that is disputed.
amountStringThe amount of the dispute. (Example: 40.13).
currencyStringCurrency of the dispute. (ISO-4217 standard, example: GBP).
reasonStringReason for the dispute. See the section on recommended Dispute Reasons below.
statusStringThe current state of the dispute. Values depend on how the dispute state machine is modeled. See the section on recommended Dispute Status below.
openBooleanTrue if a final decision on the dispute hasn’t been made yet.
responseDueByTimestampDeadline by which the merchant must respond to this dispute. (Epoch timestamp in seconds, Timezone: UTC +0:00).
createdAtTimestampA timestamp indicating when the dispute was created. (Epoch timestamp in seconds, Timezone: UTC +0:00).
openingNoteStringA text blob from the customer describing why the dispute was opened or the reason for their complaint. Dispute category codes are helpful to inform what evidence a merchant should present. However the codes do not provide the reasoning behind the customer’s complaint. In some cases, this text description can help you troubleshoot the dispute directly with your customer.
openingNoteAttachmentsFileIdAttachments to supplement the openingNote. If the customer provided photos or screenshots then they are attached here.
updatedAtTimestamp (optional)Timestamp when the dispute was updated. (Epoch timestamp in seconds, Timezone: UTC +0:00)
closingReasonStringA reason that shows how the final decision on the dispute was reached. Recommended possible values are listed in Closing Reasons below.
closingNoteString (optional)A text blob that describes in detail how the final decision on the dispute was reached. This supplements the closingReason.
merchantOrderIdStringThe identifier for the transaction on the merchant side.
transactionDateTimestampThe timestamp of the order created by the customer. (Epoch timestamp in seconds, Timezone: UTC +0:00)
settlementAmountStringThe settlementAmount for audit purposes.
metaMetaObject (Optional)The extra information for merchants to match a payment.

Meta Object

Field nameData typeDescription
transactionAmountStringThe transaction amount for the order.
networkString (Optional)The payment network used by the customer. Typically, Visa or MasterCard.
networkReferenceIdString(Optional)The identifier for the payment. (For in-store payments, the field exists)
orderTypeStringThe type of the order, should be either ONLINE or INSTORE.

Dispute Object Example

Field nameData typeExample
idStringdp_N64jYg4RC4ZBUsXjLzE3W5
orderString123456789
amountString48.46
currencyStringGBP
reason Stringfraudulent
statusStringwon
openBooleanfalse
responseDueByTimestamp1691884800
createdAtTimestamp1691884800
openingNoteStringCustomer has no knowledge of the payment.
openingNoteAttachmentsFileId[“fi_48vmw3sXdVqvtJGXbgKbAZ”]
updatedAtTimestamp (optional)1691884800
closingReasonStringmerchant_accepted
closingNoteString (optional)Merchant accepted the dispute.
merchantOrderIdStringmerchantorderid12345
transactionDateTimestamp1691884800
settlementAmountString48.46
metaMetaObject (Optional){ <br /> <space> "transactionAmount": "48.46",<br /> "orderType":"ONLINE" <br /> }

Dispute Status

Clearpay supports the following dispute status:

Note

We currently don’t support the partially_won status.

StatusDescription
needs_responseClearpay has created the dispute and notified the merchant, but the merchant has not taken action.
under_reviewMerchant has submitted evidence to Clearpay, and it is currently under review.
partially_wonIf the final dispute settlement was less than the original dispute amount, then this indicates the merchant partially won the dispute. This is a terminal state. Note: Currently we do not support this partially_won status.
wonThe evidence submitted is accepted by Clearpay and the dispute is won by the merchant. This is a terminal state.
lostThe evidence submitted is rejected by Clearpay and the dispute is lost by the merchant. This is a terminal state.

Dispute Windows

Clearpay updates the dispute status and triggers dispute notifications according to the dispute window time frames. The following is the time frame (in calendar days) to process and defend a dispute:

SummaryDescriptionCut-off time
Dispute Open WindowThe maximum window of time (from the transaction date) to open a dispute. Customers cannot open disputes beyond this time.120 days
Merchant’s Evidence Submission WindowThe time allowed between the merchant being notified of a dispute and the final time for evidence submission.13 days
Clearpay’s Decision WindowThe time allowed from the moment of evidence submission to Clearpay’s final decision.Target of 30 days

Dispute Reasons

There is always a dispute reason when a dispute is triggered. The current dispute reasons available are:

Merchant-facing Dispute ReasonDescription
product_not_receivedThe customer claims they did not receive the products or services purchased.
goods_not_as_describedThe product or service was received, but was defective, damaged, or not as described.

Closing Reasons

A closing reason indicating how the final decision on the dispute was reached is displayed to the merchant. The following are the closing reasons and their descriptions:

Merchant-facing Closing ReasonDescription
merchant_acceptedMerchant accepted the dispute.
evidence_acceptedMerchant submitted evidence which was accepted, the dispute was closed in the merchant’s favour.
evidence_rejectedMerchant submitted the evidence but it was rejected and the dispute was closed in the customer’s favour.
deadline_expiredMerchant failed to submit evidence for the dispute and the submission window timed out. Dispute was closed in the customer’s favour.
customer_cancelledCustomer withdrew the dispute and therefore it was closed in the merchant’s favour.

Retrieving disputes

List Disputes - Endpoint

List disputes within a date range based on certain criteria. This endpoint can be used for debugging or synchronising the disputes from Clearpay if/when you are unable to use the webhook method.

GET https://global-api.afterpay.com/v2/disputes

Connection Timeouts

TimeoutTime (seconds)
OPEN10
Read 20

Request Headers

HeaderTypeDefault Value
User-AgentStringClearpay Online API Simulator
AcceptStringapplication/json

Request Parameters

Field nameData typeDescription
orderIntegerPayment or Order token using which you can filter the list.
merchantStringMerchant token using which you can filter the list.
statusStringDispute status using which you can filter the list.
openedAfterTimestampFilter disputes that were created on or after this timestamp (inclusive).
openedBeforeTimestampFilter disputes that were created on or before this timestamp (inclusive).
offsetIntegerOffset for the search results. Example: Offset = 0, limit = 10 means that we will display the first ten disputes. Offset = 10, limit = 10 means that we will display the disputes numbered 10-20 in the search results.
limitIntegerThe maximum number of records that you want returned from this request.

Response

Field nameData typeDescription
dataArray (DisputeObject)An array of dispute objects that match the filter criteria in the request.
offsetIntegerOffset for the search results. Example: Offset = 0, limit = 10 means that we will display the first ten disputes. Offset = 10, limit = 10 means that we will display the disputes numbered 10-20 in the search results.
limitIntegerThe maximum number of records that you want returned from this request.
totalIntegerTotal dispute records in the search condition.

Response Example

Field nameData typeExample
dataArray (DisputeObject)See Data example code below.
offsetInteger0
limitInteger1
totalInteger1

Data example code

1[
2 {
3 "id": "dp_N64jYg4RC4ZBUsXjLzE3W5",
4 "order": "12312312312",
5 "amount": "48.46",
6 "currency": "GBP",
7 "status": "won",
8 "reason": "product_not_received",
9 "open": false,
10 "responseDueBy": -1,
11 "openingNote": "Customer has no knowledge of delivery.",
12 "openingNoteAttachments": [],
13 "merchantOrderId": "12312312312",
14 "transactionDate": 1690836227,
15 "createdAt": 1691884800,
16 "updatedAt": 1692067909,
17 "meta": {
18 "transactionAmount": "48.46",
19 "orderType": "ONLINE"
20 }
21 }
22]