Payment exceptions

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

List payment exceptions

GET /v1/payment_exceptions

Returns the payments of yours that our reconciliation could not close by itself, newest first. An exception stays open while we investigate it with the channel. The payment intent keeps the status it had: for example, a payment that succeeded after it expired stays expired until the exception is resolved.

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 exceptions with this status. One of open, resolved.

Responses

200

A list of payment exceptions.

application/json

PaymentExceptionList

FieldTypeDescription
object requiredlist
data requiredarray of PaymentException
Fields of data
FieldTypeDescription
id requiredstringUnique identifier for the exception.
object requiredpayment_exception
kind requiredstringWhat went wrong. amount_mismatch: the channel reported a different amount than the payment intent. late_success: the channel reported success on an attempt after the payment intent was decided. expired_success: the payer paid after the payment intent expired. unexpected_refund: the channel reported a refund we did not instruct. chain_reorg: a crypto payment was removed from the chain before it was final. One of amount_mismatch, late_success, expired_success, unexpected_refund, chain_reorg.
payment_intent requiredstringThe ID of the payment intent.
status requiredstringopen while we investigate, resolved when we have decided the case. One of open, resolved.
reported optionalMoneyFor amount_mismatch, the amount the channel reported, in the currency the payer paid in.
Fields of reported
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}$.
created_at requiredstring (date-time)The time the exception was opened.
resolved_at optionalstring (date-time)The time the exception was resolved.
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/payment_exceptions \
  -H "Authorization: Bearer sk_test_..." \
  -H "Api-Version: 2026-12-01"