getAmountRemainingforCheckout
Learn how to get the remaining amount available for checkout.
Use this global method to get the remaining customer credit amount that the shopper can contribute to the checkout.
Sending a request
This method accepts parameters in JSON string format. You need to pass the cartId
with this method.
cartId
Required
The Salesforce ID for the cart
object.
Receiving a response
You'll see the following parameters in the response.
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 isfalse
.
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.
Calling the global method from a custom component
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.
Last updated