Compared to the Instance
type of RevolutCheckout
, the RevolutCheckout.payments
module does not require initialization with an order token (public_id
), i.e., you do not need to create an order before checkout. Instead, you will be able to pass a createOrder
callback to asynchronously create an order
when the user is ready to pay.
See an example with the revolutPay
method:
const { revolutPay } = await RevolutCheckout.payments({
locale: 'auto', // optional, defaults to 'auto'
mode: 'sandbox', // optional, defaults to 'prod'
publicToken: '<yourPublicApiKey>', // merchant public API key
})
Field | Description | Format | Required |
---|---|---|---|
locale | Controls the language of the text in the widget. Possible values are:
| String | No |
mode | Default value: prod . Controls which API environment handles requests. Possible values are:
| Enum | No |
publicToken | The merchant's public token used for authorization. | String | Yes |