#phiredrop
1 messages · Page 1 of 1 (latest)
Hi 👋
So you want to use the Apple Pay token to create a Payment Method in Stripe, is that correct?
Hello! Well per Apple's website I think I need to send the token to Stripe to get decrypted, and have Stripe process the payment
No that is not correct. You would need to send us the JSON decoded data to create a Payment Token.
Oh, so the second icon there where is says a payment provider can decrypt, Stripe requires the merchant decrypt it first?
You don't have to decrypt the token. You can use the PKPaymentToken object to create a Payment Token in Stripe
Here is an example of what that API call would look like for Stripe:
curl -u sk_test_123: https://api.stripe.com/v1/tokens \
-d pk_token=<PKPaymentToken.paymentData decoded as JSON> \
-d pk_token_instrument_name=<PKPaymentToken.paymentInstrumentName> \
-d pk_token_payment_network=<PKPaymentToken.paymentNetwork> \
-d pk_token_transaction_id=<PKPaymentToken.transactionIdentifier>
However, this does require your Secret API key from Stripe and that should always be kept on a server, not in the client application.
Thank you. Working on wrapping my head around this