Apple Pay on the Web with API in the middle

Hi,

I was wondering if it's possible to use our API (backend app) in between my website (frontend app) and Apple servers.

This means having a website (frontend app) with all the logic to present the Apple Pay button and handle ApplePaySession events, on the click to pay it communicates with our API (backend app), and that will communicate with Apple servers. Receiving the response and send it back to the front-end website.

With Merchant Identity Certificate set up for the API, and assuming that for the Domain validation, we need only the API domain as well.

As an example let's say that the website runs on https://website.example.com and the API on https://api.example.com, both as HTTPS. So the flow would be:

Website (frontend app) <-> API (backend app) <-> Apple server

Is this implementation possible?

Thanks!

Apple Pay on the Web with API in the middle
 
 
Q