Card surcharge on Web
order.fees
array when at least one line item is provided.Do not specify a top-level amount
as this will override the dynamically-calculated amount.Surcharge
SURCHARGE
with the relevant surcharge amount.
Similarly, when the user unselects a payment method, the SDK automatically patches the client session to remove the surcharge fee.
SURCHARGE
added by the SDK to the new amount for the currently selected payment method. You can also use this mechanism to enable and disable surcharging during a client session.
card.preferredFlow
is not provided or is set to EMBEDDED_IN_HOME
, the checkout will attempt to show the card form on the home screen.
This cause the card form to break when surcharging is enabled and then disabled during a client session.We highly encourage you to set card.preferredFlow
to DEDICATED_SCENE
to force the card form to appear behind a button. This ensures that the card form can always be presented.amount
or order.fees
on the payment request as this would override the amount set during the client session.