# Payment Request API and Apple Pay/Android Pay

**URL:** <https://discourse.mozilla.org/t/payment-request-api-and-apple-pay-android-pay/37554>\
**Category:** MDN\
**Created:** [March 28, 2019, 7:51pm UTC](https://discourse.mozilla.org/t/payment-request-api-and-apple-pay-android-pay/37554 "2019-03-28T19:51:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sheppy](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/sheppy/32/20903_2.png) [@sheppy](https://discourse.mozilla.org/u/sheppy)\
**Post date:** [March 28, 2019, 7:51pm UTC](https://discourse.mozilla.org/t/payment-request-api-and-apple-pay-android-pay/37554/1 "2019-03-28T19:51:27Z")

</div>

I have come to believe that we should add to our documentation for the Payment Request API documentation for the Apple Pay and Android Pay record formats used with Payment Request. That is, things such as the `ApplePayRequestBase`, `ApplePayRequestBase`, and `ApplePayModifier` interfaces. Given the growing exposure of these payment methods, I think it wise for us to provide at least basic information about the records they use.

---

<div class="post-metadata">

**Author:** ![chrisdavidmills](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/chrisdavidmills/32/21688_2.png) [@chrisdavidmills](https://discourse.mozilla.org/u/chrisdavidmills)\
**Post date:** [March 29, 2019, 6:33pm UTC](https://discourse.mozilla.org/t/payment-request-api-and-apple-pay-android-pay/37554/2 "2019-03-29T18:33:51Z")

</div>

I’d agree with this. How many new pages are there to write to cover this stuff? I’m just wondering about how long it will take, and therefore when we might be able to schedule it in.

---

<div class="post-metadata">

**Author:** ![sheppy](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/sheppy/32/20903_2.png) [@sheppy](https://discourse.mozilla.org/u/sheppy)\
**Post date:** [March 29, 2019, 7:28pm UTC](https://discourse.mozilla.org/t/payment-request-api-and-apple-pay-android-pay/37554/3 "2019-03-29T19:28:18Z")

</div>

I’ll look through Apple’s headers and see to getting an estimate today. I’ll file an issue in zenhub with the request to add this stuff and a time estimate.

---

<div class="post-metadata">

**Author:** ![exe-boss](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/exe-boss/32/43293_2.png) [@exe-boss](https://discourse.mozilla.org/u/exe-boss)\
**Post date:** [March 30, 2019, 6:07am UTC](https://discourse.mozilla.org/t/payment-request-api-and-apple-pay-android-pay/37554/4 "2019-03-30T06:07:55Z")

</div>

Issue is&nbsp;now open:

> <https://github.com/mdn/sprints/issues/1257>
>
> There are two APIs for payment using Apple Pay. There's a non-standard one speci…fic to Apple Pay, but there's also a payment handler to allow Apple Pay to be used with Payment Request API. We definitely need to document the latter, but probably should consider covering the Apple Pay specific API too. If we decide to do that, though, we'll file it separately.
> 
> For Payment Request API, the following things need to be covered for Apple Pay:
> 
> \- \[\] Add Apple Pay to the \[list of available payment methods\](https://developer.mozilla.org/en-US/docs/Web/API/Payment\_Request\_API/Concepts#URL-based\_payment\_method\_identifiers) in the docs.
> \- \[\] Document the \`ApplePayModifier\` dictionary (1 property)
> \- \[\] Document the \`ApplePayPaymentMethodType\` enum (4 string values)
> \- \[\] Document the \`ApplePayRequest\` dictionary (2 properties; based on \`ApplePayRequestBase\`)
> \- \[\] Document the \`ApplePayRequestBase\` dictionary (9 properties)
> \- \[\] Document the \`ApplePayMerchantCapability\` enum (4 string values)
> \- \[\] Document the \`ApplePayContactField\` enum (5 string values)
> \- \[\] Document the \`ApplePayPaymentContact\` dictionary (14 properties)
> 
> \## References
> \* https://webkit.org/blog/8182/introducing-the-payment-request-api-for-apple-pay/
> \* In the WebKit sources, look in WebCore/Modules/applepay and WebCore/Modules/paymentrequest.

---

<div class="post-metadata">

**Author:** ![sheppy](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/sheppy/32/20903_2.png) [@sheppy](https://discourse.mozilla.org/u/sheppy)\
**Post date:** [March 30, 2019, 9:40am UTC](https://discourse.mozilla.org/t/payment-request-api-and-apple-pay-android-pay/37554/5 "2019-03-30T09:40:20Z")

</div>

Yeah, though I’m still in the process of fleshing it out with details. We also need an issue filed to cover Android Pay, I think.

---

<div class="post-metadata">

**Author:** ![Leon\_Frempong](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/leon_frempong/32/32225_2.png) [@Leon\_Frempong](https://discourse.mozilla.org/u/Leon_Frempong)\
**Post date:** [December 2, 2019, 3:28pm UTC](https://discourse.mozilla.org/t/payment-request-api-and-apple-pay-android-pay/37554/6 "2019-12-02T15:28:00Z")

</div>

Yes that it is a very good idea, especially for those who are interested in implementing Payment Request API. I personally think that Payment Request API is an interesting topic, since is it popular in this generation of technology. This basics will definitely help at a beginner level.

A documentation for this topic will be useful.
