#callmeredjohn-token
1 messages · Page 1 of 1 (latest)
on the server side want app side to generate a token against the account and send it back to server side so using that token we can charge the customer on server side
native app
Thanks for the info! I would recommend to not use token because they are deprecated. Instead you should follow this guide that use Payment Intents: https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet#ios-apple-pay
@wet night we already implement it on app side (documentation provided by apple) and successfully decrypt binary data provided by apple on payment successfull
Our question is how to process the decrypted data on stripe to charge a customer?
hmm ok, so you manually work with the PKToken? why not use our SDK?
but if you have a PKPayment there are undocumented ways to convert that to a Stripe token to charge it. This should help
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>`
you can see how our library does it(https://github.com/stripe/stripe-ios/blob/a05b307c8a9ef6ee6c53726da2392073b5292f19/Stripe/STPAPIClient%2BApplePay.swift#L156-L189) if that helps too
We also try to implement apple pay using this link:
https://stripe.com/docs/apple-pay?platform=ios
but delegate callback returns the same PKPayment object