#Zachary C. Smouse-android
1 messages · Page 1 of 1 (latest)
Hello! I'm not exactly sure what you're trying to do - can you give me some more detail? Are you following a specific guide?
So I'm trying to integrate Stripe in my Android app, and I have it to where customers get their cus_xxxx but I need to get my publisher key hoooked up for payments
Is this your stripe publishable API key? Or is this an Android specific key?
Yes it's my Stripe publishable key
Which guide are you following right now? Is this the accept a payment doc?
Correct
We recommend setting up an endpoint on your server that creates an ephemeral key and sends it back to your app https://stripe.com/docs/payments/accept-a-payment?platform=android#add-server-endpoint
Are you running in to a question with a specific part of that step?
I just was wondering if I needed my publisher key in the beginning of the app or at checkout
In the flow in that doc, you do not need your publishable key. Just your secret key and the ephemeral keys that you create with it.
Oh okay thank you
I was wondering because I needed my publishable key in the beginning for iOS
iOS is similar to Android. No publishable key, the iOS app will use an ephemeral key that your server makes
I think I'm thinking about something different then an endpoint. I'm needing to set my publishable key at the beginning
What exactly is the issue that you are running in to?
Where are you setting it now? Can you send me the snippet of code that you are working with?
Thank you for the details. Checking in to this.
So when you pass that key, are you getting some sort of error?
I don't know how to pass the key in Kotlin, that's why I'm getting that error
The second code picture is iOS
It looks like your app is reaching out to your server and expects to get json back that contains the publishable key
Like that BackendUrl from the first code points to your server, correcT?
Correct, so instead of the BackendUrl, should I try my key?
Hello! The error in your screenshot above is not related to Stripe, the problem is that your server is not using HTTPS.
Oh okay thank you