Merchant Web SDKs
RevolutCheckout
doc

RevolutCheckout

Load the embed script and create an instance for the order token.

type RevolutCheckout = (
'token': string,
mode?: 'prod' | 'sandbox' = 'prod'
) => Promise<Instance>;

Parameters

Initialise the widget using an order token (also called public_id), which is returned in the response of the Create an order operation, and declare the environment that you want to use:

RevolutCheckout("<token>", "prod").then(function (instance) {
// Work with instance:
// instance.payWithPopup()
// instance.createCardField()
// ...
});
caution

The Create an order endpoint was updated to a new version and now returns token as the public identifier for the order. Previous integrations might still use the deprecated endpoint returning public_id.

We strongly advise upgrading to the new Create an order endpoint.

ParameterDescriptionFormatRequired
<token>The token is passed as the parameter to call the widget instance. You can find the value of token in the response when you create an order on the Merchant API.StringYes
modeThe environment of the Merchant API you wish to use. Default: prod.

Possible values:
  • prod
  • sandbox
StringNo

This statement returns a Promise with an order Instance.

tip

The environment that you use must match the environment you used to create the order.

Was this page helpful?