The preprocess phase
In the Preprocess phase, the user app uses the payment information that the payment sheet generates (in the form of a PKPayment
object) as a result of the user's authorization. The app sends this information to the payment gateway and obtains a charge token (this item may be identified using different names, such as the registration ID, depending on the payment gateway; the order processing web app uses the charge token to charge the user's card). The app then packages the charge token along with pertinent information about the order (such as billing information, shipping information, shipping method, and so on) and sends it to the order processing web app on your server.
The following three sections describe the steps of the Preprocess phase.
The merchant app receives the payment token
When the user authorizes the payment request, the payment sheet calls the paymentAuthorizationViewController:didAuthorizePayment:completion
: delegate method (which is part of the PKPaymentAuthorizationViewControllerDelegate...