import type { PurchaseUnit, PurchaseUnitItem } from '@paypal/paypal-js'; export declare function isZeroDecimalCurrency(currency: string): boolean; export declare function formatPaypalAmount(value: number, currency: string): string; export declare function findApprovalUrl(links?: Array<{ rel?: string; href?: string; }>): string | undefined; interface OrderTotals { currency: string; grand_total: string | number; sub_total?: string | number; sub_total_incl_tax?: string | number; shipping_fee_excl_tax?: string | number; shipping_fee_incl_tax?: string | number; discount_amount?: string | number; total_tax_amount?: string | number; } interface OrderItemRow { product_name: string; product_sku: string; qty: string | number; final_price?: string | number; final_price_incl_tax?: string | number; no_shipping_required?: boolean; } export interface PaypalAmountResult { amount: PurchaseUnit['amount']; items?: PurchaseUnitItem[]; /** * False when the itemized breakdown could not be made to sum exactly to the * order's grand total (per-unit rounding drift). In that case `items` is * undefined and `amount` carries no breakdown — PayPal accepts a bare * amount, while a mismatched breakdown is a 422 that blocks checkout. */ identityHolds: boolean; } /** * Build the purchase-unit amount (with breakdown) and item list for the * PayPal create-order call. All arithmetic runs in integer minor units so the * identity `item_total + shipping + tax − discount = grand_total` is checked * exactly, never through floats. */ export declare function buildPaypalAmount(order: OrderTotals, items: OrderItemRow[], catalogPriceInclTax: boolean): PaypalAmountResult; export {};