Configuration
Constructor Configuration: RevupConfig
When creating the Revup instance, pass a configuration object with the following properties:
| PROPERTY | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| merchantDomain | string | Yes | Your merchant domain (e.g., window.location.host or production domain) |
| apiKey | string | Yes | API key for the environment (sandbox or live) |
| orderId | string | Yes | Unique order identifier for the current checkout session |
| version | number | No | API 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);