First success
Record usage on the peel. Do not log in here.
First useful success is an authorized RecordUsage against https://api.commerce.sylphx.com/v1 and a GetUsage readback of the same fact. This site has no password form and no hosted login. dens Console is not a prerequisite. Commerce never accepts a product API key.
Job
Independent developer or agent: persist one immutable usage fact for a Sylphx project and read it back from Commerce, not from a client callback.
Prerequisites
- A Platform-signed project binding for product
commerce, audiencehttps://api.commerce.sylphx.com/v1, carrying the exact contract digest. - An Identity-signed delegation, TTL ≤ 300s, whose
binding.idandbinding.revisionmatch that binding. Capabilitycommerce.usage.writefor the mutation;commerce.usage.readfor readback. - An existing meter version (
CreateMeterVersionif you are also publishing meters). - The generated SDK (
crates/commerce-sdk) and CLI (commerce) already exist on this product. Dest they default only tohttps://api.commerce.sylphx.com/v1. Do not invent a handwritten JSON SDK.
Minimum call
Protobuf JSON names for RecordUsageRequest (camelCase; snake_case aliases are accepted).
POST https://api.commerce.sylphx.com/v1/sylphx.commerce.v1.MeteringService/RecordUsage
Authorization: Bearer <delegation-jws>
Sylphx-Project-Binding: <binding-jws>
Content-Type: application/json
{
"mutation": { "idempotencyKey": "<16-128 chars>", "requestDigest": "<32-byte SHA-256>" },
"externalEventId": "evt_example_1",
"meterId": "<meter id>",
"meterVersion": "1",
"quantity": "3",
"occurredAt": "2026-08-25T00:00:00Z",
"sourceDigest": "<32-byte SHA-256>"
}
Readback
Call GetUsage with the returned usage_event_id. Success is the same quantity, meter version, and external event id. Exact replay of the mutation returns the existing receipt with replayed=true and creates no second fact. A later CorrectUsage appends a delta; it does not UPDATE the original row.
Typed failure
| Observation | Meaning | Next |
|---|---|---|
| 401 | Missing, expired, or forged envelope | Mint a fresh delegation; do not send a product API key |
| 403 | Capability or limit insufficient | Ask Identity/Platform for commerce.usage.write |
| 409 | Idempotency key reused with different bytes | New key, or replay the original bytes |
Connect CommerceErrorDetail | correlation_id matches x-request-id | Include that id; it is not a credential |
Live money still requires a bound, deployed peel and a current binding head. This page is source content for COM-SITE. Completing the call on a local checkout is not a live-money claim.