24/7 Support: 800.608.6482

Navigation


Runtime_CalculateCharges

This function allows you to apply a shipping method and or a payment method to a checkout session. Tax is automatically recalculated when this function runs.

If calling this function from a Miva page, there is a helper function with the same name that is part of runtime.js

Request Body Parameters

Session_Type Type:
String
Title:
Session Type
This will alwsys be "runtime"
Session_ID Type:
String
Title:
Session ID
The Session ID of the basket
Checkout_Session_ID Type:
String
Title:
Checkout Session ID
Checkout Session ID. This is available once OCST (Bill To/Ship To) has been submitted
PaymentMethod Type:
String
Title:
Payment Method
Optional. Needs to be in the following format: module_code:method_code. Example: 'authnet:visa'
ShippingMethod Type:
String
Title:
Shipping Method
Optional. Needs to be in the following format: module_code:method_code. Example: 'flatrate:freeship'

Response Parameters

success boolean value for if the request was successfull
total Basket Total after payment,shipping,tax have been applied
subtotal Basket subtotal. Tax is not included in this calculation
formatted_total Basket Total after payment,shipping,tax have been applied
formatted_subtotal Basket subtotal. Tax is not included in this calculation
Content-Type for the request must be 'application/json'

Example Request

Example Response

Copyright © 1997 – 2026 Miva®, Miva Merchant®, MivaPay Vault®, Camp Miva®, Miva Connect®, Vexture℠, Miva, Inc. All Rights Reserved.