Quick Start
1. Get Your API Key
Sign up for early access on the home page. You'll receive your API key via email within 24 hours.
2. Install the SDK
bash
npm install @safeway/sdk
# or
yarn add @safeway/sdk
# or
pnpm add @safeway/sdk3. Initialize the Client
typescript
import { Safeway } from '@safeway/sdk';
const safeway = new Safeway({
apiKey: process.env.SAFEWAY_API_KEY,
environment: 'production'
});4. Provision an Account
typescript
const credentials = await safeway.provision({
service: 'stripe',
credits: 50
});
console.log(credentials.apiKey);
// Use the API key to authenticate with Stripe5. Rotate Credentials
For security, rotate your credentials regularly:
typescript
const newCredentials = await safeway.rotate({
accountId: credentials.accountId,
service: 'stripe'
});