integrateledger. They cover every endpoint in the API reference except deleting a customer, which you can call over HTTP. Use them from your backend only: they need your secret API key.
Install and configure
Responses
Both SDKs return the API’s JSON. Python returns it as adict, unchanged. TypeScript returns typed objects with two differences from the raw JSON:
- Timestamps such as
createdAtareDateobjects. request_idontrackisrequestId, in both the request and the response.
Errors
A response with a 4xx or 5xx status raises an error that carries the status and Ledger’s error code. Errors lists every code.data$, such as TrackError with error.data$.error set to "insufficient_credits". In Python, error.body holds the parsed body.
Methods
TypeScript methods take one object. Path and query values sit at its top level, and a request body goes under
body when the method also has path or query values, as in updatePlan({ id, body }). Python methods take keyword arguments in snake case.
Next steps
Setup
Install the SDK and CLI, publish a catalog, start a customer.
API reference
The endpoints the SDKs call.