getAmountRemainingforCheckout
Learn how to get the remaining amount available for checkout.
Last updated
Learn how to get the remaining amount available for checkout.
Last updated
Use this global method to get the remaining customer credit amount that the shopper can contribute to the checkout.
This method accepts parameters in JSON string format. You need to pass the cartId
with this method.
Parameter | Required/Optional | Description |
---|---|---|
You'll see the following parameters in the response.
Parameter | Description |
---|---|
Import the getAmountRemainingforCheckout
method into your custom component javascript file with digialriverv3
as the namespace as shown below.
Call the global method from a custom JavaScript file by passing the cartId
as shown below.
cartId
Required
The Salesforce ID for the cart
object.
isSuccess
This global method returns a Boolean value where:
true
–indicates the call to Digital River to get the remaining amount was successful. This global method will also return the amount remaining to be be contributed and the currency code when successful.
false
–indicates an error occurred while getting the remaining amount. The system returns an error message when an error occurs, and the Boolean value is false
.
amountRemainingToBeContributed
The amount remaining to be contributed to the checkout. A customer credit source can be created for an amount less than or equal to this value.
currencyCode
The currency code of the checkout
errorMessage
If the system returns an error and the value for isSuccess
is false
, this parameter displays one of the following error messages:
Missing or invalid input parameters specified: One of the input parameters are missing or invalid.
Unable to retrieve Remaining Amount for checkout: An error message that comes from the Digital River API.