curl --request POST \
--url https://api.skia.money/v1/invoices/{invoiceId}/ack \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"debtorSignature": "<string>"
}
'import requests
url = "https://api.skia.money/v1/invoices/{invoiceId}/ack"
payload = { "debtorSignature": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({debtorSignature: '<string>'})
};
fetch('https://api.skia.money/v1/invoices/{invoiceId}/ack', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.skia.money/v1/invoices/{invoiceId}/ack",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'debtorSignature' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.skia.money/v1/invoices/{invoiceId}/ack"
payload := strings.NewReader("{\n \"debtorSignature\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.skia.money/v1/invoices/{invoiceId}/ack")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"debtorSignature\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skia.money/v1/invoices/{invoiceId}/ack")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"debtorSignature\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"invoiceId": "<string>",
"claimHash": "<string>",
"issuer": "<string>",
"debtor": "<string>",
"currency": "<string>",
"settleChainId": 123,
"faceAmount": "<string>",
"status": "ISSUED",
"outstanding": "<string>",
"paidToDate": "<string>",
"creditedToDate": "<string>",
"openDisputedAmount": "<string>",
"overdue": true,
"lateFeeAccrued": "<string>",
"dueAt": 123,
"gracePeriodSeconds": 123,
"lateFeeBpsPerDay": 123,
"surplus": "<string>",
"events": [
{
"eventId": "<string>",
"invoiceId": "<string>",
"seq": 123,
"type": "ISSUE",
"actor": "<string>",
"role": "ISSUER",
"claimHash": "<string>",
"recordedAt": 123,
"signature": "<string>",
"payload": {},
"derived": true,
"sourceEventId": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}Acknowledge or reject an invoice (debtor countersignature over the SAME claim digest)
SERVED (round-13). The DEBTOR countersigns the SAME InvoiceClaim digest (confirmed vote #1: ack = countersign same claim digest — NO second EIP-712 type; issuer and debtor are struct fields of the claim, so the signatures are role-bound, and the ACK event records the signing role). decision “acknowledge” moves the fold to ACKNOWLEDGED — this is the credit moment: an acknowledged invoice IS a receivable. decision “reject” records the terminal REJECTED state (authenticated so the issuer sees a reputation signal instead of silence). The countersignature MUST recover to claim.debtor and the bearer must be the debtor (403 INVOICE_PARTY_MISMATCH); it MUST verify against the issued claim’s claimHash (409 INVOICE_CLAIM_HASH_MISMATCH). DISCLOSED PHASE-1 LEDGER-TRUST BOUNDARY: the decision word itself is recorded by the ledger and is not covered by the countersignature (the signature proves the debtor saw and signed the claim; Phase 2 binds decisions into signed structs alongside the negotiation transcript protocol). State guards: ack/reject from a terminal state (REJECTED/VOIDED/DEFAULTED/ SETTLED) is 409 INVOICE_STATE_INVALID.
curl --request POST \
--url https://api.skia.money/v1/invoices/{invoiceId}/ack \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"debtorSignature": "<string>"
}
'import requests
url = "https://api.skia.money/v1/invoices/{invoiceId}/ack"
payload = { "debtorSignature": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({debtorSignature: '<string>'})
};
fetch('https://api.skia.money/v1/invoices/{invoiceId}/ack', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.skia.money/v1/invoices/{invoiceId}/ack",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'debtorSignature' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.skia.money/v1/invoices/{invoiceId}/ack"
payload := strings.NewReader("{\n \"debtorSignature\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.skia.money/v1/invoices/{invoiceId}/ack")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"debtorSignature\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skia.money/v1/invoices/{invoiceId}/ack")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"debtorSignature\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"invoiceId": "<string>",
"claimHash": "<string>",
"issuer": "<string>",
"debtor": "<string>",
"currency": "<string>",
"settleChainId": 123,
"faceAmount": "<string>",
"status": "ISSUED",
"outstanding": "<string>",
"paidToDate": "<string>",
"creditedToDate": "<string>",
"openDisputedAmount": "<string>",
"overdue": true,
"lateFeeAccrued": "<string>",
"dueAt": 123,
"gracePeriodSeconds": 123,
"lateFeeBpsPerDay": 123,
"surplus": "<string>",
"events": [
{
"eventId": "<string>",
"invoiceId": "<string>",
"seq": 123,
"type": "ISSUE",
"actor": "<string>",
"role": "ISSUER",
"claimHash": "<string>",
"recordedAt": 123,
"signature": "<string>",
"payload": {},
"derived": true,
"sourceEventId": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}Authorizations
TESTNET posture: simulated signature bearer — the token is the caller's 0x (address-as-identity; no per-request signature verification). Real EIP-191/EIP-712-verified bearers + SIWE (EIP-4361) sessions for the hosted UI arrive in v1.7.0. The settlement security boundary is the EIP-712 Order signature verified by SwapERC20 on-chain, not this credential. See docs/auth-posture-testnet.md.
Body
Response
Decision recorded (ACK or REJECT event appended)
THE FOLD VIEW — computed at read time; nothing here is stored except the event list it derives from. FOLD PRECEDENCE — LOCKED BEFORE CODE (R-3, the Gemini condition): payments reduce PRINCIPAL ONLY; credit notes reduce PRINCIPAL ONLY (credited exactly once — the dispute closure a note triggers is a FLAG transition, never a second deduction); the late fee is a NON-COMPOUNDING read-time accrual on outstanding − disputed: lateFeeAccrued = floor(undisputedOutstanding × lateFeeBpsPerDay × wholeDaysPastDue / 10000), where wholeDaysPastDue counts whole 86400-second days from dueAt + gracePeriodSeconds (unix seconds, never block numbers). FEES NEVER CONSUME PAYMENTS in Phase 1 — the late fee is a computed number for reporting and policy, NOT a balance: it never increases outstanding and never reduces a payment. Disputed amount: the latest open DISPUTE's disputedAmount (SUPERSEDES, never sums); a derived RESOLVE zeroes it. Overage (paid + credited > face) is surfaced as surplus and settled OUT-OF-BAND in Phase 1 (disclosed). LATE-FEE CLOCK AT DEFAULT (round-13 (H), G-3): the accrual clock freezes at the DEFAULT event's recordedAt — lateFeeAccrued counts whole days only up to min(now, T_default) once the invoice is DEFAULTED; the base stays the live undisputed remainder (a post-DEFAULT payment shrinks the fee, never grows the clock). Integer atomic-unit arithmetic ONLY.
DERIVED FOLD STATE — NEVER STORED (property-tested: no unreachable states; overdue/partial always derivable from the event list). Fold skeleton: ISSUE -> ISSUED; +ACK -> ACKNOWLEDGED; +first RECEIPTED payment while outstanding > 0 -> PARTIALLY_PAID; outstanding == 0 -> SETTLED (terminal); +REJECT -> REJECTED (terminal); +VOID -> VOIDED (terminal) — VOID GUARD (round-13 (G), G-2): REFUSED once paidToDate > 0 (409 INVOICE_STATE_INVALID) — a VOID after money moved strands debtor funds on the out-of-band refund path; VOID stays a clean-withdrawal instrument for UNPAID claims and moneyed claims unwind with credit notes (creditedToDate does NOT trip the guard); +DEFAULT (issuer-signed, ONLY after dueAt + gracePeriodSeconds, ONLY from a non-terminal state with outstanding > 0) -> DEFAULTED (terminal). DEFAULT is an ASSERTED issuer-declared reputation signal after grace — NOT cryptographic proof of non-payment (the debtor may have paid on a rail outside the issuer's view; R-5 — decentralized default attestation is Phase 3). LATE-FEE CLOCK (round-13 (H), G-3): the accrual clock FREEZES at the DEFAULT event's recordedAt once the invoice is DEFAULTED — terminals are absorbing, the fee clock stops with the status (the base stays the live undisputed remainder). OVERDUE and OPEN-DISPUTE are orthogonal FLAGS on the Receivable view, not states. Payments received on a VOIDED/REJECTED claim are recorded as events; refunds are OUT-OF-BAND in Phase 1 (disclosed — no on-chain refund rail exists for them).
ISSUED, ACKNOWLEDGED, PARTIALLY_PAID, SETTLED, REJECTED, VOIDED, DEFAULTED