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
| Name | In | Type | Description |
|---|---|---|---|
Api-Version optional | header | string | The 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 optional | query | integer | The maximum number of objects to return, from 1 to 100. Minimum 1. Maximum 100. Default 20. |
starting_after optional | query | string | A pagination cursor. Pass the ID of the last object on the previous page to get the next page. |
status optional | query | string | Only return disputes with this status. One of opened, under_review, won, lost. |
Responses
200
A list of disputes.
application/json
DisputeList
| Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
object required | list | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data required | array of Dispute | Fields of data
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
has_more required | boolean | Whether more objects exist after this page. |
Errors
Every error answers with the error object.
| Status | When |
|---|---|
| Other | An 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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The ID of the dispute. Pattern ^dp_[0-9A-Za-z]+$. |
Api-Version optional | header | string | The 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
| Field | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
id required | string | Unique identifier for the dispute. | |||||||||
object required | dispute | ||||||||||
payment_intent required | string | The ID of the disputed payment intent. | |||||||||
status required | string | The status of the dispute. One of opened, under_review, won, lost. | |||||||||
amount required | integer (int64) | The amount the channel claims, in the smallest unit of the currency the payer paid in. | |||||||||
currency required | string | A currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$. | |||||||||
held optional | Money | The amount held from your balance, in the settlement currency, while the dispute is open.Fields of held
| |||||||||
fee optional | Money | The fee you pay if you lose the dispute, in addition to the claimed amount.Fields of fee
| |||||||||
reason optional | string | The reason given for the dispute. | |||||||||
evidence optional | object | The evidence you have submitted, as key-value pairs. | |||||||||
due_by optional | string (date-time) | The deadline for submitting evidence. | |||||||||
opened_at required | string (date-time) | The time the dispute was opened. | |||||||||
closed_at optional | string (date-time) | The time the dispute was decided. |
Errors
Every error answers with the error object.
| Status | When |
|---|---|
| Other | An 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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The ID of the dispute. Pattern ^dp_[0-9A-Za-z]+$. |
Idempotency-Key required | header | string | A 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 optional | header | string | The 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
| Field | Type | Description |
|---|---|---|
evidence required | object | The 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
| Field | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
id required | string | Unique identifier for the dispute. | |||||||||
object required | dispute | ||||||||||
payment_intent required | string | The ID of the disputed payment intent. | |||||||||
status required | string | The status of the dispute. One of opened, under_review, won, lost. | |||||||||
amount required | integer (int64) | The amount the channel claims, in the smallest unit of the currency the payer paid in. | |||||||||
currency required | string | A currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$. | |||||||||
held optional | Money | The amount held from your balance, in the settlement currency, while the dispute is open.Fields of held
| |||||||||
fee optional | Money | The fee you pay if you lose the dispute, in addition to the claimed amount.Fields of fee
| |||||||||
reason optional | string | The reason given for the dispute. | |||||||||
evidence optional | object | The evidence you have submitted, as key-value pairs. | |||||||||
due_by optional | string (date-time) | The deadline for submitting evidence. | |||||||||
opened_at required | string (date-time) | The time the dispute was opened. | |||||||||
closed_at optional | string (date-time) | The time the dispute was decided. |
Errors
Every error answers with the error object.
| Status | When |
|---|---|
| Other | An 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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The ID of the dispute. Pattern ^dp_[0-9A-Za-z]+$. |
Idempotency-Key required | header | string | A 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 optional | header | string | The 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
| Field | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
id required | string | Unique identifier for the dispute. | |||||||||
object required | dispute | ||||||||||
payment_intent required | string | The ID of the disputed payment intent. | |||||||||
status required | string | The status of the dispute. One of opened, under_review, won, lost. | |||||||||
amount required | integer (int64) | The amount the channel claims, in the smallest unit of the currency the payer paid in. | |||||||||
currency required | string | A currency code in uppercase: an ISO 4217 code such as THB, or a token such as USDT. Pattern ^[A-Z]{3,5}$. | |||||||||
held optional | Money | The amount held from your balance, in the settlement currency, while the dispute is open.Fields of held
| |||||||||
fee optional | Money | The fee you pay if you lose the dispute, in addition to the claimed amount.Fields of fee
| |||||||||
reason optional | string | The reason given for the dispute. | |||||||||
evidence optional | object | The evidence you have submitted, as key-value pairs. | |||||||||
due_by optional | string (date-time) | The deadline for submitting evidence. | |||||||||
opened_at required | string (date-time) | The time the dispute was opened. | |||||||||
closed_at optional | string (date-time) | The time the dispute was decided. |
Errors
Every error answers with the error object.
| Status | When |
|---|---|
| Other | An 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"