Ce document a été mis à jour.
La traduction en Français (France) n’est pas encore terminée.
Anglais mis à jour : 11 févr. 2023
Français (France) mis à jour : 7 févr. 2022

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