1

I'm trying to implement apple pay on the web, with a payment provider (worldpay) which does not say they support apple pay on the web, only in-app.

To get around this, I'm trying to be cheeky and do the integration by "pretending to be an app". I use an apple pay token I obtained from the browser, and send it to the payment provider using the same endpoints used by an app. Everything looks like it's working fine, but in the end all payments are declined, as though the bank has declined a payment. They show up in my wallet as declined as well.

In order to figure this out, I want to know: is a difference in the structure and/or contents of the apple payment token in apps and on the web? And if so, what are the differences?

I've read this Payment Token Format Reference from apple but it did not make me any wiser.

Here is an example of how a token looks on the web:

{
    "version": "EC_v1",
    "data": "DP...A=",
    "header": {
        "ephemeralPublicKey": "MF...5g==",
        "publicKeyHash": "kd...l4=",
        "transactionId": "a5...3e"
    }
}

Appriciate any help!

Community
  • 1
  • 1
rutchkiwi
  • 427
  • 3
  • 14

1 Answers1

1

From what I know, no there is no difference between tokens. Even though I only used it with swift in-app, I would assume the tokens are the same just like with stripe and paypal.

Some research on this suggests that since they don't mention a difference in their official documentation, I would suppose they are the same.

https://developer.apple.com/apple-pay/planning/

Hope this helps.

  • Thank you Constantinos! I think you are right but it would be nice to know for sure. Have you looked at the token generated within your switch app? – rutchkiwi May 30 '19 at 15:43