Disputes

Every request goes to https://api.lemak.cash. About the reference.

List disputes

GET /v1/disputes

Returns a list of disputes, newest first.

Authentication

Bearer key. Your secret API key, which starts with sk_test_ or sk_live_. Send it as Authorization: Bearer <key>. A test key works as soon as your account exists. A production key returns 403 live_not_enabled until your account is activated.

Parameters

NameInTypeDescription
Api-Version optionalheaderstringThe API version for this request, as a date in YYYY-MM-DD format. When omitted, your account's version applies, which is set to the latest version on your first request. An unknown version returns 400 invalid_api_version. Pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.
limit optionalqueryintegerThe maximum number of objects to return, from 1 to 100. Minimum 1. Maximum 100. Default 20.
starting_after optionalquerystringA pagination cursor. Pass the ID of the last object on the previous page to get the next page.
status optionalquerystringOnly return disputes with this status. One of opened, under_review, won, lost.

Responses

200

A list of disputes.

application/json

DisputeList

FieldTypeDescription
object requiredlist
data requiredarray of Dispute
Fields of data
FieldTypeDescription
id requiredstringUnique identifier for the dispute.
object requireddispute
payment_intent requiredstringThe ID of the disputed payment intent.
status requiredstringThe status of the dispute. One of opened, under_review, won, lost.
amount requiredinteger (int64)The amount the channel claims, in the smallest unit of the currency the payer paid in.
currency requiredstringA currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$.
held optionalMoneyThe amount held from your balance, in the settlement currency, while the dispute is open.
Fields of held
FieldTypeDescription
amount requiredinteger (int64)The amount in the smallest currency unit, as an integer. For example, 1000 is 10.00 USD.
currency requiredstringA currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$.
fee optionalMoneyThe fee you pay if you lose the dispute, in addition to the claimed amount.
Fields of fee
FieldTypeDescription
amount requiredinteger (int64)The amount in the smallest currency unit, as an integer. For example, 1000 is 10.00 USD.
currency requiredstringA currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$.
reason optionalstringThe reason given for the dispute.
evidence optionalobjectThe evidence you have submitted, as key-value pairs.
due_by optionalstring (date-time)The deadline for submitting evidence.
opened_at requiredstring (date-time)The time the dispute was opened.
closed_at optionalstring (date-time)The time the dispute was decided.
has_more requiredbooleanWhether more objects exist after this page.

Errors

Every error answers with the error object.

StatusWhen
OtherAn error. The status tells you the kind: 400 invalid request, 401 invalid API key, 402 payment could not be placed, 403 forbidden, 404 not found, 409 conflict, 413 body over 64 KiB, 422 idempotency key reused, 429 too many requests, 5xx server error. A test mode key takes at most 5 requests a second.

Example

curl https://api.lemak.cash/v1/disputes \
  -H "Authorization: Bearer sk_test_..." \
  -H "Api-Version: 2026-12-01"

Retrieve a dispute

GET /v1/disputes/{id}

Retrieves a dispute by its ID.

Authentication

Bearer key. Your secret API key, which starts with sk_test_ or sk_live_. Send it as Authorization: Bearer <key>. A test key works as soon as your account exists. A production key returns 403 live_not_enabled until your account is activated.

Parameters

NameInTypeDescription
id requiredpathstringThe ID of the dispute. Pattern ^dp_[0-9A-Za-z]+$.
Api-Version optionalheaderstringThe API version for this request, as a date in YYYY-MM-DD format. When omitted, your account's version applies, which is set to the latest version on your first request. An unknown version returns 400 invalid_api_version. Pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

Responses

200

Returns the dispute.

application/json

Dispute

FieldTypeDescription
id requiredstringUnique identifier for the dispute.
object requireddispute
payment_intent requiredstringThe ID of the disputed payment intent.
status requiredstringThe status of the dispute. One of opened, under_review, won, lost.
amount requiredinteger (int64)The amount the channel claims, in the smallest unit of the currency the payer paid in.
currency requiredstringA currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$.
held optionalMoneyThe amount held from your balance, in the settlement currency, while the dispute is open.
Fields of held
FieldTypeDescription
amount requiredinteger (int64)The amount in the smallest currency unit, as an integer. For example, 1000 is 10.00 USD.
currency requiredstringA currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$.
fee optionalMoneyThe fee you pay if you lose the dispute, in addition to the claimed amount.
Fields of fee
FieldTypeDescription
amount requiredinteger (int64)The amount in the smallest currency unit, as an integer. For example, 1000 is 10.00 USD.
currency requiredstringA currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$.
reason optionalstringThe reason given for the dispute.
evidence optionalobjectThe evidence you have submitted, as key-value pairs.
due_by optionalstring (date-time)The deadline for submitting evidence.
opened_at requiredstring (date-time)The time the dispute was opened.
closed_at optionalstring (date-time)The time the dispute was decided.

Errors

Every error answers with the error object.

StatusWhen
OtherAn error. The status tells you the kind: 400 invalid request, 401 invalid API key, 402 payment could not be placed, 403 forbidden, 404 not found, 409 conflict, 413 body over 64 KiB, 422 idempotency key reused, 429 too many requests, 5xx server error. A test mode key takes at most 5 requests a second.

Example

curl https://api.lemak.cash/v1/disputes/dp_123 \
  -H "Authorization: Bearer sk_test_..." \
  -H "Api-Version: 2026-12-01"

Submit dispute evidence

POST /v1/disputes/{id}/evidence

Adds evidence to an open dispute. Each key you send replaces the same key on the dispute, and other keys are kept. A dispute that is won or lost accepts no more evidence.

Authentication

Bearer key. Your secret API key, which starts with sk_test_ or sk_live_. Send it as Authorization: Bearer <key>. A test key works as soon as your account exists. A production key returns 403 live_not_enabled until your account is activated.

Parameters

NameInTypeDescription
id requiredpathstringThe ID of the dispute. Pattern ^dp_[0-9A-Za-z]+$.
Idempotency-Key requiredheaderstringA unique key you generate for this request, up to 255 characters. A retry with the same key and body returns the original response. Without it, the request returns 400 idempotency_key_required. At most 255 characters.
Api-Version optionalheaderstringThe API version for this request, as a date in YYYY-MM-DD format. When omitted, your account's version applies, which is set to the latest version on your first request. An unknown version returns 400 invalid_api_version. Pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

Request body

application/json

DisputeEvidence

FieldTypeDescription
evidence requiredobjectThe evidence to add, as key-value pairs. Each key replaces the same key on the dispute. The keys receipt, customer_communication, shipping_documentation and uncategorized_file each take the ID of a file you uploaded with purpose dispute_evidence, in the same mode; any other value is 400 invalid_evidence_file. At API version 2026-09-01 those keys also take free text, but a value that is a file ID must still name a file of yours. Every other key takes any value.

Responses

200

Returns the dispute with the evidence added.

application/json

Dispute

FieldTypeDescription
id requiredstringUnique identifier for the dispute.
object requireddispute
payment_intent requiredstringThe ID of the disputed payment intent.
status requiredstringThe status of the dispute. One of opened, under_review, won, lost.
amount requiredinteger (int64)The amount the channel claims, in the smallest unit of the currency the payer paid in.
currency requiredstringA currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$.
held optionalMoneyThe amount held from your balance, in the settlement currency, while the dispute is open.
Fields of held
FieldTypeDescription
amount requiredinteger (int64)The amount in the smallest currency unit, as an integer. For example, 1000 is 10.00 USD.
currency requiredstringA currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$.
fee optionalMoneyThe fee you pay if you lose the dispute, in addition to the claimed amount.
Fields of fee
FieldTypeDescription
amount requiredinteger (int64)The amount in the smallest currency unit, as an integer. For example, 1000 is 10.00 USD.
currency requiredstringA currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$.
reason optionalstringThe reason given for the dispute.
evidence optionalobjectThe evidence you have submitted, as key-value pairs.
due_by optionalstring (date-time)The deadline for submitting evidence.
opened_at requiredstring (date-time)The time the dispute was opened.
closed_at optionalstring (date-time)The time the dispute was decided.

Errors

Every error answers with the error object.

StatusWhen
OtherAn error. The status tells you the kind: 400 invalid request, 401 invalid API key, 402 payment could not be placed, 403 forbidden, 404 not found, 409 conflict, 413 body over 64 KiB, 422 idempotency key reused, 429 too many requests, 5xx server error. A test mode key takes at most 5 requests a second.

Example

curl -X POST https://api.lemak.cash/v1/disputes/dp_123/evidence \
  -H "Authorization: Bearer sk_test_..." \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Api-Version: 2026-12-01" \
  -H "Content-Type: application/json" \
  -d '{
  "evidence": {
    "key": "value"
  }
}'

Close a dispute

POST /v1/disputes/{id}/close

Accepts the dispute: you agree that the payer is right and you submit no more evidence. The dispute moves to lost, the held amount goes back to the channel and the dispute fee is charged. A dispute that is already lost is returned as it is. A dispute that is won cannot be closed.

Authentication

Bearer key. Your secret API key, which starts with sk_test_ or sk_live_. Send it as Authorization: Bearer <key>. A test key works as soon as your account exists. A production key returns 403 live_not_enabled until your account is activated.

Parameters

NameInTypeDescription
id requiredpathstringThe ID of the dispute. Pattern ^dp_[0-9A-Za-z]+$.
Idempotency-Key requiredheaderstringA unique key you generate for this request, up to 255 characters. A retry with the same key and body returns the original response. Without it, the request returns 400 idempotency_key_required. At most 255 characters.
Api-Version optionalheaderstringThe API version for this request, as a date in YYYY-MM-DD format. When omitted, your account's version applies, which is set to the latest version on your first request. An unknown version returns 400 invalid_api_version. Pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

Responses

200

Returns the dispute, now lost.

application/json

Dispute

FieldTypeDescription
id requiredstringUnique identifier for the dispute.
object requireddispute
payment_intent requiredstringThe ID of the disputed payment intent.
status requiredstringThe status of the dispute. One of opened, under_review, won, lost.
amount requiredinteger (int64)The amount the channel claims, in the smallest unit of the currency the payer paid in.
currency requiredstringA currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$.
held optionalMoneyThe amount held from your balance, in the settlement currency, while the dispute is open.
Fields of held
FieldTypeDescription
amount requiredinteger (int64)The amount in the smallest currency unit, as an integer. For example, 1000 is 10.00 USD.
currency requiredstringA currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$.
fee optionalMoneyThe fee you pay if you lose the dispute, in addition to the claimed amount.
Fields of fee
FieldTypeDescription
amount requiredinteger (int64)The amount in the smallest currency unit, as an integer. For example, 1000 is 10.00 USD.
currency requiredstringA currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$.
reason optionalstringThe reason given for the dispute.
evidence optionalobjectThe evidence you have submitted, as key-value pairs.
due_by optionalstring (date-time)The deadline for submitting evidence.
opened_at requiredstring (date-time)The time the dispute was opened.
closed_at optionalstring (date-time)The time the dispute was decided.

Errors

Every error answers with the error object.

StatusWhen
OtherAn error. The status tells you the kind: 400 invalid request, 401 invalid API key, 402 payment could not be placed, 403 forbidden, 404 not found, 409 conflict, 413 body over 64 KiB, 422 idempotency key reused, 429 too many requests, 5xx server error. A test mode key takes at most 5 requests a second.

Example

curl -X POST https://api.lemak.cash/v1/disputes/dp_123/close \
  -H "Authorization: Bearer sk_test_..." \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Api-Version: 2026-12-01"