#cowboy0602_error
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1239495995889291305
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there!
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
I try to check but there are no logs from today the only logs are from One month ago
Than k you for your help
That means your are facing an internal server error in your own integratino and not from Stripe APIs.
I had 2 Stripe account on Two different accounts how do I enter the right aaccount using request from made in Java
I can show you
do you know how do I find the client stripe key it started with ca_... few month ago now I dont retrieve it
now it stars with acct_...
I use stripe in test mode for my integration
๐ What you can share safely
This is a public server. Anyone can see the messages posted here, so you need to be careful when sharing certain information.
๐ Not safe to share
Do not share anything sensitive or privileged on Discord, including the following:
- ๐ Secret API keys (most Stripe secret API keys start with
sk_,rk_, orek_) - ๐ Secrets (examples include Stripe's client secrets, which contain
_secret_, and Stripe's webhook signing secrets, which start withwhsec_) - ๐ Passwords, keys, or other login/authentication details
- ๐ Information about non-public features or functionality
If you don't want something public, don't share it here.
โ Safe to share
Stripe object IDs are safe to share in public, and are often required to help us investigate and debug issues. Some examples of IDs you can share safely are:
- โ
Customer IDs (
cus_) - โ
Checkout Session IDs (
cs_) - โ
Subscription IDs (
sub_) - โ
Invoice IDs (
in_) - โ
Setup Intent IDs (
seti_) - โ
Payment Intent IDs (
pi_) - โ
Charge IDs (
ch_andpy_) - โ
Request IDs (
req_)
This list isn't comprehensive; there are too many Stripe object IDs and prefixes to list that are safe to share publicly.
If in doubt, ask someone on this server with the Stripe Staff role if a particular piece of information is safe to share before you share it.
The Stripe key are there: sk_ is the secret key and pk_ for the public key
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
yes please
exports.create_setup_intent = onRequest(async (request, response) => {
try {
console.log(request.body.uid);
const snapshot = await admin.database().ref('stripe_customers').child(request.body.uid).once('value');
console.log(snapshot.val().customer_id);
const customer = snapshot.val().customer_id;
const setupIntent = await stripe.setupIntents.create({ customer });
const clientSecret = setupIntent.client_secret;
// Send publishable key and SetupIntent details to client
response.send({
publishableKey: functions.config().stripe.pk,
clientSecret: clientSecret
});
} catch (error) {
console.error(error);
response.status(500).send({ error: 'Internal server error' });
}
});
what's the error that is logged in your console?
httpRequest: {
latency: "1.258774981s"
protocol: "HTTP/1.1"
remoteIp: ""
requestMethod: "POST"
requestSize: "469"
requestUrl: "https://europe-west1-.cloudfunctions.net/create_setup_intent"
responseSize: "750"
serverIp: "2001***"
status: 500
userAgent: "okhttp/4.9.0"
}
insertId: "6641d1fe000491484a7bfe79"
labels: {
goog-managed-by: "cloudfunctions"
instanceId: "00f46b9285ed7bc6a9fff5a9512dc6279b9d1ad6044df4629d024fa58b0292b7d848ca9f550ff984016e306351c08b4d1b734e07da49c5534fdd5b27c03b0bd1"
}
logName: "projects//logs/run.googleapis.com%2Frequests"
receiveTimestamp: "2024-05-13T08:40:30.302893352Z"
resource: {
labels: {
configuration_name: "create-setup-intent"
location: "europe-west1"
project_id: ""
revision_name: "create-setup-intent-00008-cuy"
service_name: "create-setup-intent"
}
type: "cloud_run_revision"
}
severity: "ERROR"
spanId: "4015525082052686569"
timestamp: "2024-05-13T08:40:28.863553Z"
trace: "projects/******/traces/4d80b44cd42f79ed801e1aa86017a21d"
traceSampled: true
}
TypeError: Cannot read properties of null (reading 'customer_id')
at /workspace/index.js:192:35
I've already checked there is no this customer_id in the database at this location thats why I console Log it
so the problem is in this line
const customer = snapshot.val().customer_id;
are you using the stripe firebase extension?
Yes
you need to reach out to their support