#nothing_api

1 messages ¡ Page 1 of 1 (latest)

grim agateBOT
#

👋 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/1341283040504188984

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

gilded kestrel
#

Hi! Looking into this!

tall matrix
#

Hello Sam.
Yes please i have been stuck on this from last 2 days.

gilded kestrel
#

Can you provide me with the code for your payment sheet and ephemeral key?

tall matrix
#

Yes

#

fetch('https://api.stripe.com/v1/ephemeral_keys',{
method:'POST',
headers:{
'Authorization':'Bearer ,
'Content-Type':'application/x-www-form-urlencoded',
'Stripe-Version':'2023-10-16'
},
body:customer=${"cus_Rn1GwvvGPow7Q7"}
}).then(res=>res.json()).then(key=>{
console.log(key.secret);
initPaymentSheet({
merchantDisplayName:"Example, Inc.",
paymentIntentClientSecret:"pi_3QtjFPGHic5sXtZa1VSEr7l2_secret_N2RjLu2OyQfJXFW53iUQVUiiT",
customerEphemeralKeySecret:key.secret
}).then(()=>presentPaymentSheet());
});

#

Should i share it as file or this would work ? .

gilded kestrel
#

You shouldn't be sharing your secret key. Please remove that.

tall matrix
#

Yes removed.
it was secret test key

gilded kestrel
tall matrix
#

I tried to create the payment intent again with the customer id but still the saved methods are not visible in sheet

pi_3QtjtUGHic5sXtZa0Rkd9OIa_secret_tzW3vpMIgYpM3yOzV2fvOcBZa

gilded kestrel
#

Can I get the latest code you used to test with the new payment intent?

tall matrix
#

Yes

#

fetch('https://api.stripe.com/v1/ephemeral_keys',{
method:'POST',
headers:{
'Authorization':'Bearer ,
'Content-Type':'application/x-www-form-urlencoded',
'Stripe-Version':'2023-10-16'
},
body:customer=cus_Rn1GwvvGPow7Q7
}).then(res=>res.json()).then(key=>{
console.log(key.secret);
initPaymentSheet({
merchantDisplayName:"Example, Inc.",
paymentIntentClientSecret:"pi_3QtjtUGHic5sXtZa0Rkd9OIa_secret_tzW3vpMIgYpM3yOzV2fvOcBZa",
customerEphemeralKeySecret:key.secret
}).then(()=>presentPaymentSheet());
});

gilded kestrel
tall matrix
#

Yes it worked.
the customer id was missing.
Thanks you so much Sam.