ramp-ts
v0.1.1
Published
TypeScript SDK for the Ramp Developer API
Maintainers
Readme
ramp-ts
TypeScript SDK for the Ramp Developer API.
Not an official Ramp package. This is an open-source client built from the public API spec. For the full platform story — CLI, MCP, webhooks, guides — start at docs.ramp.com.
Before you start
You'll need a Ramp developer app and an OAuth access token. Ramp's docs walk through this better than we can here:
- Quickstart — create a developer app, get a token, make your first API call
- Authorization — OAuth 2.0 flows, scopes, and token exchange
- Sandbox — test environment with demo data (
https://demo-api.ramp.com)
Other useful Ramp resources:
- API reference (OpenAPI)
- Ramp CLI — terminal & agent workflows
- Ramp MCP — AI assistant integration
- Webhooks — event-driven integrations
- Changelog — API updates
Install
Requires Node.js 22+.
npm install ramp-ts
# or
pnpm add ramp-tsQuick example
Once you have an access token (see Quickstart):
import {
createRampClient,
getTransactionsCanonicalListWithPagination,
} from 'ramp-ts';
createRampClient({
accessToken: process.env.RAMP_ACCESS_TOKEN!,
// baseUrl: 'https://demo-api.ramp.com', // use for sandbox
});
const { data, error } = await getTransactionsCanonicalListWithPagination({
query: { page_size: 50 },
});
if (error) {
console.error('Request failed:', error);
} else {
console.log(data);
}Sandbox
Point at the demo API when testing:
createRampClient({
accessToken: process.env.RAMP_ACCESS_TOKEN!,
baseUrl: 'https://demo-api.ramp.com',
});See Ramp's sandbox guide for access and test data.
Configure the client directly
import { client, getTransactionsCanonicalListWithPagination } from 'ramp-ts';
client.setConfig({
baseUrl: 'https://api.ramp.com',
auth: () => process.env.RAMP_ACCESS_TOKEN!,
});
await getTransactionsCanonicalListWithPagination();Refresh tokens on each request
createRampClient({
accessToken: async () => getRampAccessToken(), // your token refresh logic
});Token exchange: POST https://api.ramp.com/developer/v1/token — details in the authorization guide.
What's in the package
All endpoints, types, and the HTTP client are re-exported from the package root:
| Export | Description |
|---|---|
| SDK functions | Typed, tree-shakeable per-endpoint calls (e.g. getTransactionsCanonicalListWithPagination) |
| Types | Request/response TypeScript types for every endpoint |
| client | Fetch-based HTTP client singleton |
| createRampClient() | Helper to set base URL + Bearer token |
Functions return { data, error } by default. Browse available methods in src/client/sdk.gen.ts or use your editor's autocomplete.
How this fits with Ramp's developer tools
| Tool | Best for | |---|---| | ramp-ts (this package) | Typed SDK in your Node/TS app | | Ramp CLI | Scripts, terminals, agent loops | | Ramp MCP | AI assistants (Claude, Cursor, etc.) | | OpenAPI spec | API contract & reference |
Development
pnpm install
pnpm spec:fetch
pnpm generate
pnpm typecheck && pnpm buildThe client stays in sync with Ramp's OpenAPI spec.
License
MIT
