Se actualizó este documento.
La traducción en español no está disponible todavía.
Actualización del documento en inglés: 11 feb. 2023
Actualización del documento en español: 27 mar. 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