Re: [w3c/payment-request] Should API support billing address capture (for tax computation)? (#27)

> Yes. My current understanding is that a payment instrument will have a billing address associated with it. For those payment instruments controlled by payment handler, they will therefore "own" the billing address.

Ok, so, if billing addresses are bound to payment instruments, then `paymentmethodchange` might again be the right fit (as shown by Apple Pay).

Then a redacted address can be sent back with the event's `methodDetails`, allowing `.updateWith()` to be called. Similarly, then `.retry()` can be used when checking the `PaymentResponse`. 

We can then work out what each dictionary looks like, but essentially, they can each have a `PaymentAddress` attached as needed, or sometimes null.

For each payment method, we can define a base dictionary that everyone could use:

```ts
dictionary PaymentMethod {
   PaymentAddress? billingAddress;
}

// for paymentmethodchange, for example:
dictionary BasicCardChangeDetails  : PaymentMethod {
   // inherits billingAddress;
}

dictionary BasicCardResponse  : PaymentMethod {
  // inherits billingAddress;
  // card number, etc.
}
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/issues/27#issuecomment-411620129

Received on Thursday, 9 August 2018 02:54:22 UTC