文档已更新。
中文(简体) 译文尚未完成。
英语更新时间:2023年2月11日
中文(简体) 更新时间:2022年3月11日

PaymentDetailsUpdate

Use an object based on PaymentDetailsUpdate to represent the new payment details and any errors after the customer makes changes in the payment sheet in an PaymentDetailsChangedEvent.

For example, if an error is identified while handling the PaymentDetailsChangedEvent the PaymentDetailsUpdate should include a PaymentDataError in the errors array as well as the updated paymentDetails like this:

{
  "paymentDetails": {
    "displayItems": [...],
    "summaryItems": [...],
    "total": {...},
    "shippingOptions": [...]
  },
  "errors": [
    {
      "reason": "INVALID_OFFER_CODE",
      "message": "SPRING20 has expired",
      "field": "offers"
    }
  ]
}

Properties

PropertyTypeDescriptionRequired

paymentDetails

PaymentDetails

Payment details to replace data on the payment sheet.

Yes

errors

Array<PaymentDataError>

An optional list of errors to present to the user related to the changes made in the PaymentDetailsChangedEvent

No

[deprecated] shippingAddressErrors

{ [k: String]: PaymentDataError; }

This property is deprecated, please use errors instead.

Error information about the shipping address to display to the user. Each key is a property from the W3C PaymentAddress object and the corresponding value indicates the error for that property. You can also use shippingOptionId as a key for an error related to the shipping option.

No