calculateRemainingBalance

post

/ccagent/v1/payment/calculateRemainingBalance

Get remaining order amount for mixed currency orders.

Request

Supported Media Types
Body ()
Root Schema : calculateRemainingBalance_request
Type: object
Show Source
Example:
{
    "amount":20,
    "orderId":"o410438",
    "alternateCurrencyAmount":19,
    "alternateCurrencyCode":"USD"
}
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : calculateRemainingBalance_response
Type: object
Show Source
  • The input amount in alternate currency.
  • The amount remaining that can be paid in alternate currency.
  • The alternate currency code.
  • The input amount in order currency.
  • The remaining order amount in order currency.
  • The order currency.
  • The minimum monetary currency amount remaining to be paid.
  • The order ID.
  • payments
    The array of payment groups
  • A site level setting, when enabled, makes it mandatory for the shopper to pay shipping charges in monetary currency. Additionally, if the allowAlternateCurrency flag is enabled then shopper has to pay atleast shipping and tax total in monetary, rest of the amount can be paid in mix of points and monetary currency, or can be paid only in points or only in monetary.
  • A site level setting, when enabled, makes it mandatory for the shopper to pay tax in monetary currency. Additionally, if the allowAlternateCurrency flag is enabled then shopper has to pay atleast shipping and tax total in monetary, rest of the amount can be paid in mix of points and monetary currency, or can be paid only in points or only in monetary.
  • This field represents the shipping amount, shipping discount and shipping surcharge in monetary Currency.\nPrerequisites for the value in this Attribute:\n1. PriceList configured for the site is in custom currency.\n2. payTaxInSecondaryCurrency and payShippingInSecondaryCurrency flags are enabled.
  • This field represents the total tax(Item Tax and Shipping Tax) of the order in Monetary Currency. \nPrerequisites for the value in this Attribute: Prerequisites for the value in this Attribute:\n1. PriceList configured for the site is in custom currency.\n2. payTaxInSecondaryCurrency and payShippingInSecondaryCurrency flags are enabled.\n3. If the tax is included in the price of the item, then this value represents only shipping tax in monetary currency.
  • The order state.
Example:
{
    "secondaryCurrencyTaxAmount":0,
    "alternateCurrencyAmountRemaining":"746.0",
    "secondaryCurrencyShippingAmount":425,
    "amount":20,
    "orderId":"o410440",
    "payments":[
        {
            "paymentGroupId":"pg530482",
            "amountAuthorized":20,
            "amount":20,
            "customPaymentProperties":{
                "1000addnl-property-key5":"1000payment-property-value5",
                "1000addnl-property-key2":"1000payment-property-value2"
            },
            "gatewayName":"demoLoyaltyPointsPaymentGateway",
            "uiIntervention":null,
            "paymentMethod":"customCurrencyPaymentGroup",
            "isAmountRemaining":false,
            "paymentState":"AUTHORIZED",
            "type":"loyaltyPoints",
            "currencyCode":"silverPts"
        }
    ],
    "alternateAmount":19,
    "alternateCurrencyCode":"USD",
    "payShippingInSecondaryCurrency":true,
    "payTaxInSecondaryCurrency":true,
    "amountRemaining":"20.0",
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:9080/ccagentui/v1/payment/calculateRemainingBalance"
        }
    ],
    "state":"PENDING_PAYMENT",
    "minimumMonetaryCurrencyAmountRemaining":"406.0",
    "currencyCode":"silverPts"
}
Nested Schema : payments
Type: array
The array of payment groups
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : customPaymentProperties
Type: object
Custom Payment Properties

Default Response

The error response
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top