Re: [w3c/payment-request] Passing a transaction id to a payment request (#911)

I'm not aware of concrete use case of this, but I have seen somewhere that `detailsPromise` was defined so that a merchant can let the browser wait until they determine the total cost. This means  at the same time that the merchant won't know the transaction id until then. And the merchant has to be able to pass a transaction id along with the `PaymentDetails` object by resolving `detailsPromise`. That's why I asked.

BTW, I was looking at [PayPal integration as an example](https://developer.paypal.com/docs/archive/checkout/how-to/server-integration/#2-set-up-your-server-to-call-the-paypal-api), but my understanding is this is very common pattern used across multiple payment services.

If `id` of `PaymentDetailsInit` can be used as a transaction id, that's great. I'm writing a new document and would add this pattern there, but if there's some kind of mention in the spec, that would be even more obvious for implementers.

-- 
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/911#issuecomment-621026446

Received on Wednesday, 29 April 2020 07:05:17 UTC