The Apple Pay functionality is currently in a testing phase. It is only available for merchants in Chile 🇨🇱, Mexico 🇲🇽, and Peru 🇵🇪, and supports Visa and Mastercard cards.Please note that this functionality is subject to change without prior notice.
Introduction#
Function to render the Apple Pay button and initialize an instance of ICardApplePay.⚠️ Domain Verification Required: To use Apple Pay, you must host the validation file on your server (at the .well-known path) and register your domain in the Kushki Console. The payment flow will not function without this verification on a secure (HTTPS) domain.
For this method to work correctly, you must include the following container in your project's HTML:
Parameters#
| Parameter | Type | Description |
|---|
| kushkiInstance | IKushki | Object that implements the IKushki interface. |
| options | ApplePayOptions | Visual and behavioral options for the Apple Pay button. |
Visual and behavioral options (ApplePayOptions)#
| Option | Type | Description |
|---|
| style | "black" | "white" | Defines the visual style (color) of the Apple Pay button. |
| locale | "en-US" | "es-ES" | "es-MX" | "pt-BR" | Sets the language and region for the Apple Pay button text. |
| type | "add-money" | "book" | "buy" | "check-out" | "continue" | "contribute" | "donate" | "order" | "pay" | "plain" | "reload" | "rent" | "set-up" | "subscribe" | "support" | "tip" | "top-up" | Defines the text label and action displayed on the Apple Pay button. |
Returns#
Errors#
This method may throw the following exceptions:ERRORS.E024 — Apple Pay resources were not created.
ERRORS.E025 — Apple Pay payments are not available.
Examples#
Initialization#
Initialize the Kushki instance:Initialize the CardApplePay instance:Using Events and Requesting the Token#
Got a suggestion on this documentation? Contact us.