The Frame Node.js Library simplifies the process of creating a seamless payment experience within your web app. It provides direct access to the underlying APIs that drive these components, allowing you to design fully customized payment workflows tailored to your app's needs.
npm install framepayments
# or
yarn add framepayments- Initalize the client. You'll need your developer secret key from Frame, if you don't already have one you can sign up at https://www.framepayments.com
import { FrameSDK } from 'framepayments';
const frame = new FrameSDK({
apiKey: 'your_api_key_here', // replace with your secret API key
});- Access API endpoints directly using available types and dot notation. For a list of all available endpoints: https://docs.framepayments.com
const newCustomer = await frame.customers.create({
name: 'Alice Johnson',
email: 'alice@example.com',
});
console.log(newCustomer.id); // e.g. cust_abc123const subscription = await frame.subscriptions.create({
customer: 'cust_abc123',
plan: 'plan_basic_monthly',
});
console.log(subscription.status); // e.g. activeOur privacy policy can be found at https://framepayments.com/privacy.