Apple Business Chat allows shoppers to make purchases right in Messages on their Apple devices using Apple Pay. Apple Pay is compatible with these devices.
Note: When returning the details of an order the actual credit or debit card is shown as payment method (e.g. "MAESTRO") instead of Apple Business Chat.
For Apple Business Chat payments the following prerequisites need to be fulfilled:
This rest of this page covers how to implement Apple Pay in Apple Business Chat.
Besides, implementing an additional requests to the Payment Service (Initialize an Apple Business Chat session), the Sending an Apple Pay Payment Request flow as described by Apple has to be implemented.
We handle setting up the required ID's and certificates.
The following diagram shows the payment flow when using Apple Business Chat.
The first thing to do when the shopper requests payment is creating an order. (See Create a new order.)
The next step is to request a merchant session by sending an initialization request to the Payment System.
The response also contains the payment gateway url and the merchant identifier that are needed in the next step.
Finally, an Apple Pay Payment Request can be created and send to Apple Business Chat using the data from the previous step (see Sending an Apple Pay Payment Request). Business Chat will forward the payment request to the device of the shopper.
The following details need to be provided in the request (in the interactiveData.data.payment dictionary) :
|endpoints.paymentGatewayUrl||The payment gateway url which was in the response of the previous step.|
|merchantSession||The merchant session which was encoded as string in the response of the previous step.|
|paymentRequest.applePay.merchantCapabilities||The payment capabilities supported by the merchant. The only supported value is 'supports3DS'.|
|paymentRequest.applePay.merchantIdentifier||The merchant identifier which was in the response of the previous step.|
|paymentRequest.applePay.supportedNetworks||The payment networks supported by the merchant. The supported values are 'visa', 'masterCard', 'maestro', 'vPay'. (Depending on the payment methods enabled on your account.)|
The supported networks can be determined using: List payment methods of an Order
When the shopper clicks on the Apple Pay button the payment sheet is shown on the device. Apple initiates the authorization of the payment when the shopper authenticates the payment with Touch ID or Face ID, by calling the authorize request using the payment gateway url.
After the Payment System authorizes the payment the result is send back to the Apple device, and the payment sheet closes.
The Payment System sends status change notifications to the customer service agent application during the authorization of the payment, which should be used to get the order details from the Payment System.
The order details should be used to determine if the shopper has paid the order.
Optionally an Order Tracking Endpoint can be implemented as described by Apple (see Tracking Orders).