BTAmountBreakdown
public struct BTAmountBreakdown : Encodable
A recurring billing amount breakdown. This object can only used for the BTPayPalCheckoutRequest to
customize how the transaction amount is broken down. If BTAmountBreakdown is provided, itemTotal
is required. Some fields are conditionally required or not accepted depending on the checkout flow (e.g., one-time
vs subscription).
-
Initialize a
BTAmountBreakdownobject.Declaration
Swift
public init( itemTotal: String, taxTotal: String? = nil, shippingTotal: String? = nil, handlingTotal: String? = nil, insuranceTotal: String? = nil, shippingDiscount: String? = nil, discountTotal: String? = nil )Parameters
itemTotalRequired: Total amount of the items before any taxes or discounts.
taxTotalOptional: Total tax amount applied to the transaction. Required if
lineItems.taxAmountis provided. Should match the sum of tax amounts from all line items.shippingTotalOptional: Cost of shipping.
handlingTotalOptional: Cost associated with handling the items (e.g., packaging or processing). Not accepted if
PayPalRecurringBillingDetailsare included.insuranceTotalOptional: Cost of insurance applied to the shipment or items. Not accepted if
PayPalRecurringBillingDetailsare included.shippingDiscountOptional: Discount amount applied specifically to shipping. Not accepted if
PayPalRecurringBillingDetailsare included.discountTotalOptional: General discount applied to the total transaction. Not accepted if
PayPalRecurringBillingDetailsare included.
View on GitHub