- Get Started
- Guides
- Integrations
- References
- API Reference
- Basic Payment
- Forex
- Authentication
- Card Account
- Apple Pay
- Virtual Account
- Bank Account
- Token Account
- Customer
- Billing Address
- Merchant Billing Address
- Shipping Address
- Merchant Shipping Address
- Merchant
- Corporate
- Recipient
- Marketplace & Cart
- Airline
- Lodging
- Passenger
- Tokenization
- Recurring Migration
- 3D Secure
- Custom Parameters
- Async Payments
- Webhook notifications
- Job
- Risk
- Response Parameters
- Card On File
- Chargeback
- Result Codes
- Payment Methods
- Transaction Flows
- Regression Testing
- Data Retention Policy
- API Reference
- Support
Apple Pay
Introduction
Apple Pay can be utilized as a checkout option on a payment page as well as a direct checkout option on the cart page (fast checkout). After configuring your environment, loading the Apple Pay button via COPYandPAY payment widget is just like loading any other brand, i.e. in step 2, APPLEPAY must be specified as a brand. Once the Apple Pay button will be used by the consumer, the Apple Pay payment sheet will appear on the device.
As soon as the consumer starts to interact with the Apple Pay payment sheet, several events will be triggered. All events can be consumed by implementing the COPYandPAY API callback functions. All callback functions offered by the Apple Pay SDK are wrapped into the COPYandPAY API. No interaction with the Apple Pay SDK is required.
For steering the Apple Pay payment sheet or for updating data on the Apple Pay payment sheet after the consumer started to interact with it, several options are available.
Apple Pay on the cart page (fast checkout)
Sometimes you might want to display the Apple Pay button early on the payment workflow where you do not yet have a checkout ID. Usually, the shopper can decide whether to continue with the normal checkout, or to immediately pay with Apple Pay.
It is possible to display the Apple Button first and create a checkout ID later. In step 2:
- Use
paymentWidgets.js
without a checkout ID<script src="https://eu-test.deutsche-payment-gateway.com/v1/paymentWidgets.js"></script>
- Define a callback function in
wpwlOptions.createCheckout
to create a checkout
Example:
wpwlOptions.createCheckout = function() {
// Call your server to create a checkout
return $.post("https://your.server")
.then(function(response) {
// Assume that your server returned the response containing checkoutId
return response.checkoutId;
});
};
Note that you can use the callback function to check whether all prerequisites are met (e.g. terms and conditions are accepted) before starting the payment. If some conditions are not met, you can prevent Apple Pay from starting by returning false.
In addition, since the checkout amount and currency are initially unknown, you will need to manually set the Apple Pay parameterstotal.amount
and currencyCode
.
See Apple Pay Options further configurations.