POST
Open a dispute

Authorizations

Authorization
string
header
default:sk_test_docs_246e232c64ccc7a001bf61ec0f2e6ab0
required

Authorization: Bearer <secret key>. Secret keys belong to your organisation, are shown once when created in the dashboard, and are scoped (see x-required-scope on each operation). Keep them on your server. Live keys are issued after your business is verified. Publishable keys (pk_) are only for @ketapay/checkout and don't work here.

KetaPay-Customer-Token
string
header
required

Proof that your customer approved this call, from POST /customer_sessions/{id}/verify. Sent together with your secret key. Valid for 15 minutes, for that customer's escrows only.

Headers

Idempotency-Key
string
required

Unique key for this operation. Retries with the same key return the first result.

Maximum string length: 255
Example:

"7f3e2a10-6c4d-4b8e-9a1f-2d5c8e7b6a40"

Path Parameters

id
string<uuid>
required

Body

application/json
reason
enum<string>
required

Buyer reasons: not_received (goods or work never arrived), not_as_agreed (differs from what was agreed), damaged, incomplete (only part was delivered). Seller reason: buyer_unresponsive (delivered, but the buyer won't release or respond). Either side: other.

Available options:
not_received,
not_as_agreed,
damaged,
incomplete,
buyer_unresponsive,
other
description
string
required
Required string length: 10 - 2000
milestone_id
string<uuid> | null

The milestone in question. Leave out for the whole escrow.

files
string<uuid>[]

First evidence, as ids from POST /files with purpose dispute_evidence

Maximum array length: 10

Response

Dispute opened

id
string<uuid>
required
object
string
required
Allowed value: "dispute"
livemode
boolean
required
escrow_id
string<uuid>
required
milestone_id
string<uuid> | null
required

Null when the dispute covers the whole escrow

opened_by
enum<string>
required
Available options:
buyer,
seller
status
enum<string>
required

open: the buyer and seller are trying to agree. under_review: a KetaPay mediator is deciding. resolved: ended, see outcome.

Available options:
open,
under_review,
resolved
reason
enum<string>
required

Buyer reasons: not_received (goods or work never arrived), not_as_agreed (differs from what was agreed), damaged, incomplete (only part was delivered). Seller reason: buyer_unresponsive (delivered, but the buyer won't release or respond). Either side: other.

Available options:
not_received,
not_as_agreed,
damaged,
incomplete,
buyer_unresponsive,
other
outcome
enum<string> | null
required

Null until resolved. withdrawn: the buyer withdrew the dispute and the deal continues. partially_refunded: split between buyer and seller.

Available options:
released,
refunded,
partially_refunded,
withdrawn,
null
resolved_by
enum<string> | null
required

Who ended it. A party can only end it against themselves (conceding) or by withdrawing their own dispute.

Available options:
buyer,
seller,
ketapay,
null
url
string<uri>
required

The dispute room, where the buyer and seller add evidence and talk to KetaPay

Example:

"https://app.ketapay.com/disputes/8e2f4a6c-1d3b-4c7e-9a5f-0b2d4f6a8c13"

awaiting_evidence_from
enum<string> | null
required

Who KetaPay is waiting on for evidence, if anyone

Available options:
buyer,
seller,
both,
null
evidence_due_at
string<date-time> | null
required

Deadline for the evidence KetaPay asked for

evidence_count
integer
required

How many evidence submissions both sides have made

Required range: x >= 0
opened_at
string<date-time>
required
resolved_at
string<date-time> | null
required
refunded_amount
integer | null

For refunded and partially_refunded, the amount returned to the buyer

Required range: x >= 0
Example:

45000000