#vell2x
1 messages · Page 1 of 1 (latest)
Hello! How are you sending the request?
What are you getting back instead of the object?
Method: POST, RequestUri: 'https://mowie-service-server.onrender.com/v1/customers', Version: 2.0, Content: System.Net.Http.StringContent, Headers:
{
Content-Type: application/json; charset=utf-8
Content-Length: 73
}
That's a request to your server, not to the Stripe API.
Should I create an endpoint for '/v1/customers' on my server?
Let's take a step back. Can you tell me what you're trying to build?
I am building a non-native android app for a lawn care service
Non-native, but you're using C++?
Yes. Xamarin
Okay, so which specific part of the app are you working on right now?
Registration. When the user registers for the app I forward their information to stripe to create a customer account. I want to get the customer id back to save for the payment intent when the user makes a purchase.
Gotcha. All of the sensitive operations that require a secret key should be taking place on your server, not in the app, so do you have your server set up to create a Customer using the Stripe API?
I dont, but I can. I am using node js for my server
That's the first step. You can create a Customer using this endpoint, and we have a stripe-node library you can use: https://stripe.com/docs/api/customers/create
What's the next step? I know you will be unavailable over the weekend.
Set up your app to communicate with your server. To clarify, anything that requires your secret Stripe API key should be happening on your server. It's not safe to have your secret key in your app. Your app should talk to your server, and then your server should perform those secret key operations.