If you’d like to take Apple Pay and Google Pay payments with Square you’ll need to use our guides on adding Digital Wallet payment methods. The Apple Pay and Google Pay tokens have to be generated from our SDKs in order to be processed by the Payments API.
This form of generating a token to pass to CreatePayment in Square isn’t currently supported. You have to use our Web Payments SDK to generate the tokens for Apple Pay and Google Pay.
At this time the ability to create tokens to pass in the CreatePayment request on the server side isn’t available. All tokens need to be generated from the Web Payments SDK.