This guide outlines the steps to enable Apple Pay on your Solidgate Payment Form, following Apple’s development requirements. Once set up, the payment form features the Apple Pay button, enhancing your payment options.
Solidgate Payment Form complies with Apple’s development requirements for Apple Pay on the Web. Apple Pay is available in supported regions and on specific platforms in Safari, and in non-Safari browsers.
Display button
To integrate the button and start accepting Apple Pay payments through the Solidgate Payment Form, complete the following steps:
- Domain verification
Host a domain-verification file at a specified path for each domain where Apple Pay payments are to be processed.1
HTTPS://[DOMAIN_NAME]/.well-known/apple-developer-merchantid-domain-association
- Verification in HUB
After hosting the file, verify the domain in the Developers section of the Solidgate HUB . This step is required as Solidgate team verifies domains for payment processing.
If you request to create a payment form with Apple Pay without verifying the domain, the button will not be displayed, and the appropriate warning will be sent.
If the domain verification fails, a warning message is displayed in the console using console.warn('The domain is not verified for Apple Pay');
. This serves as a notification that the domain is not verified, and the Apple Pay button will not be displayed.
Once the domain is verified, you are ready to display the Apple Pay button on the Solidgate Payment Form, with the additional option to hide the button if necessary.
mounted
event to check when the Apple Pay button is set up and displayed. When the event is emitted for the applebtn
entity, this means the Apple Pay button is fully displayed.If errors occur during an Apple Pay payment attempt after the integration setup and button configuration, please review the essential steps to ensure the integration is configured as intended and test it.
Non-Safari browsers
Customers can complete purchases with Apple Pay on devices running macOS, Windows, and other operating systems using third-party browsers. During checkout, they will see the Apple Pay option and can finalize the transaction by scanning a QR code.
When Apple’s JavaScript object detects a non-Safari browser, it generates a QR code for transaction processing. Users can then scan the QR code with their iPhone, running iOS 18 or later, to complete the purchase through the familiar Apple Pay process. This approach is necessary, as many browsers do not natively support Apple Pay. Merchants must update their integration to enable Apple Pay in browsers other than Safari.
To enable Apple Pay in non-Safari browsers
- Add a new
integrationType
parameter for the applePayButtonParams object.
By default, theintegrationType
is set tocss
, representing the previous, well-tested, and stable integration method. - Update the
integrationType
by setting it tojs
. - Check your website appearance after the changes.
The new integration type uses the WebComponents approach, which could result in visual differences between old and new versions, depending on your website styling.
|
|
Customization
In addition to displaying the button on the payment form, you can also control the button position, color, and type. Use the
applePayButtonParams
object for changes as you would for all other customizations in the Solidgate
Create a seamless experience for customers by styling your payment form.
Payment Form
.
Button position
To set the Apple Pay button position, create and specify a div
, pass its id attribute value to the containerId
parameter in the
applePayButtonParams
object.
|
|
|
|
|
|
|
|
In this example, the div
with the ID yourCustomContainerId
is created and the containerId
parameter in the
applePayButtonParams
object is set to the value yourCustomContainerId
.
Without a specified containerId
, the button appears by default above all fields of the Solidgate Payment Form. If a non-existing container is specified, an error message appears in the console.
id =‘specified-container’
does not exist.
Button styling
To change the button style, two parameters can be changed in the applePayButtonParams object:
-
black
- use on white or light-color backgrounds that provide sufficient contrast. Avoid using on black or dark backgrounds. -
white-outline
- use on white or light-color backgrounds that do not provide sufficient contrast. Do not place on dark or saturated backgrounds. -
white
- use on dark-color backgrounds that provide sufficient contrast.
Apple provides several types of buttons so that you can choose the button type that fits best with the terminology and flow of your purchase or payment experience. You can find more information in the Apple Pay Guidelines.
The following button types are not supported by Solidgate:
donate
support
rent
contribute
tip
Button hiding
To hide the button from the customer, pass
false
to the enabled
parameter. You do not need to specify
true
to display the button on the form as it is the default value. When you pass the
false
value, it means that the form with the passed parameters of containerId
, color
, and type
is collected but not displayed on the Solidgate Payment Form.
|
|
Apple payment sheet
Solidgate Payment Form gives you access to customize merchant name label on the Apple Payment
Sheet.
To change the name, you need to pass the apple_pay_merchant_name
parameter in the
paymentIntent
object.