Contents

ApplePayLineItem

A line item in a payment request—for example, total, tax, discount, or grand total.

Declaration

dictionary ApplePayLineItem {
	ApplePayLineItemType type;
	DOMString label;
	DOMString amount;
	ApplePayPaymentTiming paymentTiming;
	Date recurringPaymentStartDate;
	ApplePayRecurringPaymentDateUnit recurringPaymentIntervalUnit;
	long recurringPaymentIntervalCount;
	Date recurringPaymentEndDate;
	Date deferredPaymentDate;
	DOMString automaticReloadPaymentThresholdAmount;
};

Overview

Line items appear in the payment sheet.

The following code is an example of a line item for a $20 charge that recurs every six months starting on 01/01/2022 and ending on 01/01/2024:

{
    "label": "Subscription",
    "amount": "20.00",
    "type": "final",
    "paymentTiming": "recurring",
    "recurringPaymentStartDate": new Date("2022-01-01T00:00:00"),
    "recurringPaymentIntervalUnit": "month",
    "recurringPaymentIntervalCount": 6,
    "recurringPaymentEndDate": new Date("2024-01-01T00:00:00"),
}

The following code is an example of a line item for a deferred charge of $50 on 07/01/2023:

{
    "label": "After Trial Period",
    "amount": "50.00",
    "type": "final",
    "paymentTiming": "deferred",
    "deferredPaymentDate": new Date("2023-07-01T00:00:00"),
}

For examples of line items within an ApplePayPaymentRequest, see lineItems and total.

Topics

Setting line item properties

Configuring payment timing

Configuring recurring payments

Configuring deferred payments

Configuring automatic reload payments

See Also

Setting the total and summary line items