Contents

ApplePayPaymentRequest

A request for payment, which includes information about payment-processing capabilities, the payment amount, and shipping information.

Declaration

dictionary ApplePayPaymentRequest {
	required sequence < ApplePayMerchantCapability > merchantCapabilities;
	required sequence < DOMString > supportedNetworks;
	required DOMString countryCode;
	sequence < ApplePayContactField > requiredBillingContactFields;
	ApplePayPaymentContact billingContact;
	sequence < ApplePayContactField > requiredShippingContactFields;
	ApplePayPaymentContact shippingContact;
	DOMString applicationData;
	sequence < DOMString > supportedCountries;
	boolean supportsCouponCode;
	DOMString couponCode;
	ApplePayShippingContactEditingMode shippingContactEditingMode;
	required ApplePayLineItem total;
	sequence < ApplePayLineItem > lineItems;
	required DOMString currencyCode;
	ApplePayShippingType shippingType;
	sequence < ApplePayShippingMethod > shippingMethods;
	sequence < ApplePayPaymentTokenContext > multiTokenContexts;
	ApplePayAutomaticReloadPaymentRequest automaticReloadPaymentRequest;
	ApplePayRecurringPaymentRequest recurringPaymentRequest;
	ApplePayDeferredPaymentRequest deferredPaymentRequest;
};

Mentioned in

Overview

Use an ApplePayPaymentRequest dictionary to represent a merchant request for payment for goods or services. Your website creates a payment request as soon as the user taps the Apple Pay button to make a purchase.

A payment request contains information that describes the purchase, such as the merchant information, supported payment networks, and the line items, including the total, the currency code, the billing and shipping contact, and more.

A typical payment request is for a one-time payment. To support different types of payment requests, provide one of the following options in the payment request:

  • A recurringPaymentRequest object to request a recurring payment. Recurring payments, such as subscriptions, can feature different payment intervals (for example, annually or monthly), and either regular or trial billing cycles.

  • An automaticReloadPaymentRequest object to set up automatic reload payments. Automatic reload payments, such as store card top-ups, feature a balance threshold and a reload amount. The card automatically reloads with the reload amount when the account drops below the balance threshold.

  • Use the deferredPaymentRequest property to set up a deferred payment request using the ApplePayDeferredPaymentRequest class. Deferred payments include purchases, such as hotel bookings or pre-orders, where the card renders payment at a later date upon the receipt of goods or delivery of services.

  • Use the applePayLaterAvailability property to indicate whether this payment request is eligible for Apple Pay Later. You can indicate that Apple Pay Later is unavailable for certain kinds of transactions, including subscriptions, items that require recurring payments or prohibited items, such as gift cards.

  • A multiTokenContexts sequence to request multiple payment tokens to support multimerchant payments. Set up multitoken transactions to process and display payment requests with multiple merchants on one payment sheet, for example, a booking site where a user pays for a hotel, flight, and car rental from different merchants.

For recurring payments and automatic reload payments, you can optionally set up merchant token life-cycle notifications for the request. For more information, see Apple Pay Merchant Token Management API.

Topics

Setting the total and summary line items

Requesting recurring payments

Requesting automatic reload payments

Requesting deferred payments

Requesting multitoken or multimerchant payments

Working with transaction information

Requesting billing and shipping contact information

Providing known contact information

Working with coupon codes

Adding custom data

See Also

Apple Pay payment request