Money
Settle a buyer’s dispute
Needs the money:write scope. About scopes
Decides an open dispute, as the portal’s Accept and Reject do. accept credits the buyer (the disputed amount, or creditAmount; 0 accepts with no credit) on the buyer statement covering the charge; reject closes it with no credit. A dispute already decided answers 422 dispute_closed. Needs an Idempotency-Key, so a retry credits once.
keyheader
AuthorizationBearer <traki_account_…>id*stringFormat
uuidapplication/json- body
decision*stringValue in
"accept""reject"resolution?stringWhy, shown to the buyer.
Length
1 <= length <= 500creditAmount?numberWith accept: the credit, when it is not the disputed amount.
Range
0 <= value <= 100000Success
application/json- response
id*stringFormat
uuidcode*stringbuyer*callId*|nullleadId*|nullreason*stringamount*stringcurrency*stringstate*stringresolution*string|nullresolvedAt*string|nullcreditedAmount*stringversion*stringcreatedAt*stringupdatedAt*stringcurl -X POST 'https://api.traki.io/v1/account/disputes/497f6eca-6276-4993-bfeb-53cbbbba6f08/settle' \ -H "Authorization: Bearer $TRAKI_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: a-unique-id-for-this-change' \ -d '{ "decision": "accept"}'Example Response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "code": "string", "buyer": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "externalId": "string", "name": "string" }, "callId": "4722cd84-0ec7-4ef5-8c34-1b0150f45f53", "leadId": "3c6e2b8e-0e8f-48db-8791-27271df10113", "reason": "string", "amount": "string", "currency": "string", "state": "string", "resolution": "string", "resolvedAt": "string", "creditedAmount": "string", "version": "string", "createdAt": "string", "updatedAt": "string"}