Apple Pay™ In-App is integrated to applications in order to facilitate the checkout process by using a mobile device access code or other physical recognition system during an online payment with Apple Pay™.
The main advantages of the Apple Pay™ In-App solution is:
There are two integration methods available:
Both options offer the same basic functionalities.
In both cases, Apple's Passkit Framework is used by the merchant's application to make requests and receive encrypted payment details from Apple. The decryption of the details of the payment received can be done with two methods: SDK or API.
In all cases, the payload is transmitted to the PayFacto servers via the payment API
Here are the endpoints available via the payment API for Apple Pay™ In-App.
If the merchant decide to use the API decryption method, he must decrypt the payload information himself before sending the decrypted information to the PayFacto payment gateway to be processed.
This process is more complex than the second method, which is why we strongly recommend the use of SDK decryption method.
1) The merchant application requests and receives the encrypted payload.
2) The payload is sent to the merchant's server for decryption.
3) PayFacto payment gateway receives the decrypted payload from the merchant's server and processes the transaction with the host.
When the SDK decryption method is used, the merchant sends the encrypted payload to the PayFacto payment gateway, which will take care of the decryption and process the transaction with the host.
1) The merchant application requests and receives the encrypted payload.
2) The payload is sent to the merchant's server.
3) PayFacto payment gateway receives the encrypted payload from the merchant's server and decrypts it.
4) PayFacto processes the transaction with the host.
A certificate associated with the merchant number is used to secure the transaction data. Apple Pay™ servers use the certificate's public key to encrypt payment data. We need to use the private key to decrypt the data in order to process payments.
When the SDK method is used, the merchant must generate a certificate signing request (CSR) on the PayFacto portal and also import the private key so that PayFacto is able to decrypt the payload.
Link to the PayFacto test portal: https://test.portal.payfacto.cloud/ps/Home
In order to generate the CSR, you must access the payment manager and select the option Customer Administrator → Apple Pay™ Configuration
In the configuration page, select the merchant for which you want to create the CSR:
Once the merchant is selected, you will see the following information appear on the screen:
You can change the name of the entry with the following field:
To generate the CSR to sign via the Apple member web portal, click on the icon:
The CSR will be automatically downloaded to your workstation.
You must then refer to the Apple development center to sign the request: https://developer.apple.com/library/archive/ApplePay_Guide/Configuration.html
Once the CSR is signed and the certificate obtained, you must upload it in your merchant's Apple Pay™ configuration via PayFacto's portal.
To do this, you must access the payment manager and select the option Customer Administrator → Apple Pay™ Configuration
In the merchant configuration, click on the icon:
Retrieve the certificate from your workstation.
Then click on Open , the certificate will be automatically associated with the merchant for which the certificate was uploaded.
Each transaction requires the merchant to send an aknowledgment (Ack).
The ACK transaction is used to confirm that the response was successfully received and the transaction should be considered as COMPLETED.
The ACK transaction result can be true or false. If you receive “false”, you can try to send the ACK transaction again for 2 more times. If the result is still “false”, consider the transaction as NOT successful.
| API | Endpoint |
|---|---|
| Ack | https://test.api.payfacto.cloud/v1/ack |
In the Apple App, the developer will need to set the capabilities to “request.merchantCapabilities = .capability3DS”.
https://developer.apple.com/documentation/passkit/pkpaymentrequest/1619257-merchantcapabilities
And also, they should only accept card on our certified networks:
let paymentNetworks:[PKPaymentNetwork] = [.amex,.masterCard,.visa,.interac]
if PKPaymentAuthorizationViewController.canMakePayments(usingNetworks: paymentNetworks) {
}Apple developer center : https://developer.apple.com/apple-pay/