Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Disputes

Change the settings of disputes

Turns disputes on or off, says what the business sells and what its policies are, and says whether its backend sends the usage of the customer for each dispute. Send only what changes. Disputes turn on only with Stripe, Dodo Payments or Paddle connected. The Stripe key of the workspace needs Write access to Disputes and to Files for the answers. Owners and admins.

patch/api/v1/dispute-settings

Authorization

HeaderAuthorization: Bearer <API key>
Or the headerX-API-Key: <API key>
API keyMake one in Troopy under Settings > API keys. It acts as you, in its workspace.

Other ways to call it

CLItroopy disputes update-settings
MCP toolNone. Call it over REST or with the CLI.
Rate limit30 calls in 60 seconds, for each key
RetriesSend an Idempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.

Body

application/json
onboolean
descriptionstring | null

What the business sells, in two or three sentences for a bank

kindenum<string>

servicesmerchandise

usageFromBackendboolean

With it on, a new dispute waits 60 minutes for the usage

refundPolicystring | null

The refund policy, as the customer reads it. It goes as a document with a dispute about a refund or about what was sold

cancellationPolicystring | null

The cancellation policy, as the customer reads it. It goes as a document with a dispute about a subscription or a refund

disclosurestring | null

How a customer sees the policies before a payment, like: the checkout page links to the terms

Response

200 · application/json
data*object
13 properties
on*boolean

Whether Troopy reads the disputes of the workspace's payment providers and prepares their evidence

connected*boolean

Whether one of those providers is connected in this workspace

providers*array<object>

The payment providers that Troopy reads disputes from, and whether this workspace connected each one

3 properties
id*enum<string>

stripedodopaymentspaddle

name*string
connected*boolean
description*string | null

What the business sells, as the bank reads it

kind*enum<string>

servicesmerchandise

usageFromBackend*boolean

Whether the backend of the business sends the usage of the customer for each dispute

refundPolicy*string | null

The refund policy of the business, in its own words

cancellationPolicy*string | null

The cancellation policy of the business, in its own words

disclosure*string | null

How a customer sees the policies before a payment

autoSubmit*object | null

The grant to submit without a person, while it is in force

6 properties
until*string

ISO 8601 date and time

maxAmount*number

The largest disputed amount that goes without a person, in the units of the currency

currency*string
dailyCap*integer
grantedBy*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
grantedAt*string

ISO 8601 date and time

ended*object | null

When the last grant ended, and why

2 properties
at*string

ISO 8601 date and time

why*string
syncedAt*string | null

When Troopy last read the disputes from the providers

error*string | null

What the last read of a provider said, when it failed

Errors

400 invalid_inputFix the field named in detail. Each operation's schema is in /api/v1/openapi.json.
401 unauthorizedSend an API key as `Authorization: Bearer tr_live_...`. Create one in Troopy under Settings.
403 forbiddenThe key lacks a scope this operation needs, or its owner lacks the role. detail says which; create a key with the scope, or ask an organization owner or admin.
409 conflictThis Idempotency-Key was used for a different request, or that request is still running. Use a new key for a new request.
429 rate_limitedWait the number of seconds in Retry-After, then retry.