#cowboy0602_error

1 messages ยท Page 1 of 1 (latest)

silver oxideBOT
#

๐Ÿ‘‹ 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.

hallow lindenBOT
lament dome
last path
#

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

lament dome
#

That means your are facing an internal server error in your own integratino and not from Stripe APIs.

last path
#

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

silver oxideBOT
#

๐Ÿ’ 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_, or ek_)
  • ๐Ÿ›‘ Secrets (examples include Stripe's client secrets, which contain _secret_, and Stripe's webhook signing secrets, which start with whsec_)
  • ๐Ÿ›‘ 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_ and py_)
  • โœ… 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.

lament dome
#

The Stripe key are there: sk_ is the secret key and pk_ for the public key

silver oxideBOT
mild lily
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

last path
#

yes thank you I can show you the NodeJS code

#

if you see something wrong

mild lily
#

yes please

last path
#

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' });
}

});

mild lily
#

what's the error that is logged in your console?

last path
#

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
}

mild lily
#

that's not the actual log

#

I want the result of console.error(error);

last path
#

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

mild lily
#

so the problem is in this line

const customer = snapshot.val().customer_id;

#

are you using the stripe firebase extension?

last path
#

Yes

mild lily
#

you need to reach out to their support