Skip to main content

Configuration

Constructor Configuration: RevupConfig

When creating the Revup instance, pass a configuration object with the following properties:

PROPERTYTYPEREQUIREDDESCRIPTION
merchantDomainstringYesYour merchant domain (e.g., window.location.host or production domain)
apiKeystringYesAPI key for the environment (sandbox or live)
orderIdstringYesUnique order identifier for the current checkout session
versionnumberNoAPI version path segment. If omitted, the SDK uses its default (e.g., 2)

Configuration Example

const config = {
apiKey: env === 'live' ? apiKeys.live : apiKeys.sandbox,
merchantDomain: window.location.origin,
orderId: orderId,
// version: 2 // optional
};
const revup = new Revup(config);