Skip to content

[Bug]: PaymentCurrencyAmount.value type is inconsistent with W3C Payment Request API spec #192

@dinstein

Description

@dinstein

What happened?

Description

The value field in PaymentCurrencyAmount is currently defined as a numeric type (float in Python, float64 in Go, Double in Kotlin), but the W3C Payment Request API specification defines it as a DOMString (string type).

This inconsistency may cause issues with cross-language interoperability and deviates from the standard that the codebase explicitly references in its docstrings.

Affected files

  • src/ap2/types/payment_request.pyvalue: float
  • samples/go/pkg/ap2/types/payment_request.goValue float64
  • samples/android/.../data/ShoppingAgentTypes.ktval value: Double

Proposed fix

Change value to a string type across all languages to align with the W3C spec.

See PR: #191

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions