Official RevOps Javascript Component Library
RevOps helps software businesses set up their usage-based pricing and billing. Request early access at https://www.revops.io and automate your pricing today.
Here we use the public API key found in RevOps at https://<your-organization>.revops.io/integrations/api/key
.
For more information on authentication see Authentication Overview.
import React from 'react'
import { PaymentMethod } from 'revops-js'
/* Default stylesheet to configure the look and feel */
import 'revops-js/themes/defaultStyles.css'
export const App = ({
accountId = 'your-acct-id',
publicKey = 'your-public-api-key'
}) => (
<PaymentMethod
publicKey={publicKey}
account={{
accountId: accountId,
email: 'bugs@bunny.com',
}}
/>
)
export default App
See a live example and play with a demo at https://codesandbox.io/s/sample-revopsjs-form-tx6kv
It only takes a few steps:
- Copy your public API key from
https://<your_instance>.revops.io/integrations/api/key
- Replace the public key
- Complete the form
- Find the account at
https://<your_instance>.revops.io/accounts
- SignUp - Creates an acccount in RevOps
- PaymentMethod - Creates and modifies payment instruments. Also supports the creation of accounts in RevOps for a unified workflow.
- RevOpsAuth - Wrapper component used to authenticate and coordinate state between multiple components.
Revops-js is highly customizable and supports a number of ways to integrate it into an existing application.
- PaymentMethod Integration Guide
- Styling Revops-js Components
- Authentication Overview
- Using Callbacks
- Using Refs
- Logging Levels
MIT © RevOps, Inc.