Accept Apple Pay on a payment page

Learn how to accept Apple Pay on a hosted payment page

Applies to:Developers

You can accept Apple Pay on a payment page by enabling the payment method. You can also customize the Apple Pay button style, color, and language as needed.

Considerations

Before you get started, keep these considerations in mind:

  • You must have the Apple Pay service activated and payment method domains configured for your paypoint. See Apple Pay Overview for guidance.
  • Apple Pay is available only for one-time payments. If autopay is enabled on a payment page, Apple Pay won’t be available as a payment method.
  • For performance reasons, we don’t recommend embedding payment pages in iframes. However, when Apple Pay is enabled, a payment page embedded in an iframe won’t load at all.

Add Apple Pay to the payment page

To add Apple Pay acceptance on a payment page, you must first enable it as a payment method. Set applePay to true when creating or updating the payment page.

1 "pageContent": {
2 "paymentMethods": {
3 "methods": {
4 "applePay": true,
5 "amex": true,
6 "discover": true,
7 "mastercard": true,
8 "visa": true
9 }
10 }
11 }

Configure the Apple Pay button

If you wish to customize the Apple Pay button on the payment page, you can pass configuration options using the paymentMethods.settings.applepay object.

buttonStyle
enumDefaults to black

The Apple Pay button style. Supported options:

  • “black”: Default black button.
  • “white-outline”: White button with an outline.
  • “white”: Solid white button.
buttonType
enumDefaults to pay

The Apple Pay button style. Supported options:

  • “black”: Default black button.
  • “white-outline”: White button with an outline.
  • “white”: Solid white button.
language
enumDefaults to en-us

The Apple Pay button locale. Supported options:

  • en-US: English (US)
  • ar-AB: Arabic
  • ca-ES: Catalan
  • zh-CN: Chinese (China)
  • zh-HK: Chinese (Hong Kong)
  • zh-TW: Chinese (Taiwan)
  • hr-HR: Croatian
  • cs-CZ: Czech
  • da-DK: Danish
  • de-DE: German
  • nl-NL: Dutch
  • en-AU: English (Australia)
  • en-GB: English (UK)
  • fi-FI: Finnish
  • fr-CA: French (Canada)
  • fr-FR: French (France)
  • el-GR: Greek
  • he-IL: Hebrew
  • hi-IN: Hindi
  • hu-HU: Hungarian
  • id-ID: Indonesian
  • it-IT: Italian
  • ja-JP: Japanese
  • ko-KR: Korean
  • ms-MY: Malay
  • nb-NO: Norwegian
  • pl-PL: Polish
  • pt-BR: Portuguese (Brazil)
  • pt-PT: Portuguese (Portugal)
  • ro-RO: Romanian
  • ru-RU: Russian
  • sk-SK: Slovak
  • es-MX: Spanish (Mexico)
  • es-ES: Spanish (Spain)
  • sv-SE: Swedish
  • th-TH: Thai
  • tr-TR: Turkish
  • uk-UA: Ukrainian
  • vi-VN: Vietnamese

For example, in your request to the create a payment page endpoint, you could change the button’s style, color and language:

1"paymentMethods":{
2 ...
3 "settings":{
4 "applepay":{
5 "buttonType":"support",
6 "buttonStyle":"white-outline",
7 "language":"ca-ES"
8 }
9 }
10}

Prefill fields with Apple Pay

Pre-filling payment fields is covered in the Hosted Payment Pages Quickstart.