這份文件已更新。
中文(台灣) 的翻譯尚未完成。
英文更新時間:2023年6月8日
中文(台灣) 更新時間:2022年2月6日

PaymentDetails

Use an object based on PaymentDetails to represent payment details that appear in the payment sheet when the customer interacts with Meta Pay.

PaymentDetails provides data for a PaymentRequest, a PaymentDetailsChangedEvent, or a PaymentDetailsUpdate.

When PaymentDetails is part of a PaymentDetailsChangedEvent, certain address fields are redacted to protect customer privacy. Only fields required for calculating tax and shipping are provided.

Properties

PropertyTypeDescriptionRequired

total

PaymentItem

The total amount for the payment.

Yes

summaryItems

Array<SummaryPaymentItem>

Additional summary items, such as tax or shipping costs. summaryItems appear along with the total, but the total should not be included in summaryItems.

No

displayItems

Array<PaymentItem>

Details of the transaction, such as per-item costs.

No

offers

Array<Offer>

Offers entered by the customer which the merchant can use to apply discounts to the cost. offers can include codes already applied to the transaction and reflected in the summaryItems or in PaymentDetailsChangedEvent can represent offers entered by the user during the checkout flow.

No

billingAddress

PaymentAddress

The billing address for the payment method. Will be provided when PaymentDetails is part of a PaymentDetailsChangedEvent, and only when PaymentOptions requestBillingAddress is true and the customer has selected a payment method. Omit this property when PaymentDetails is part of constructing a PaymentRequest or PaymentDetailsUpdate.

No

shippingAddress

PaymentAddress

The shipping address for the transaction. Will be provided when PaymentDetails is part of a PaymentDetailsChangedEvent, and only when PaymentOptions requestShipping is true. Omit this property when PaymentDetails is part of constructing a PaymentRequest or PaymentDetailsUpdate.

No

[deprecated]

shippingOptions

Array<ShippingOption>

Shipping options that appear to the customer.

NOTE: This field is now deprecated. Please use fulfillmentOptions instead.

No

fulfillmentOptions

Array<FulfillmentOption>

Fulfillment options that appear to the customer.

No

[deprecated]

shippingOptionId

string

The ID of the ShippingOption. This option should appear selected in the user interface unless the customer changes it.

NOTE: This field is now deprecated. Please use fulfillmentOptionId instead.

No

fulfillmentOptionId

string

The ID of the FulfillmentOption. This option should appear selected in the user interface unless the customer changes it.

No

pickupInfo

PickupInfo

An object representing the information related to a pickup order.

No