#karanmehra.zeroit-ephemeralkey
1 messages ยท Page 1 of 1 (latest)
yep, your backend sever creates it and returns it to your app.
https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet#add-server-endpoint for example.
I don't think we have something like a live demo, but you can for example download our samples from places like https://stripe.com/docs/payments/accept-a-payment and try to run them!
there's a Glitch project for the backend too :
not sure I follow the question?
okay
Actually I've got a issue
when I'm trying to create epheral. key
got a error
@quasi lake wait, I'll share a screenshot with you
'No such customer' means you're using the wrong secret API key. Like that customer cus_xxx doesn't exist on the account whos key you're using.
I don't understand the question.
in your code you see you are hard-coding a particular customer ID cus_xxxx. If you're getting that error it means that customer doesn't exist on the Stripe account you're running the code against. I wouldn't know where you got that customer ID, it's your code, you'd need to investigate and make sure you configure the code to use the right key when you initialise the Stripe() library in Node.
does that make sense?
for example, why are you using a hard-coded cus_xxx string instead of the customerId value on line 44?
I've just test
the function
That's why I set in hard coded
well then you hard coded it to some wrong value. Not sure how else I can explain this but hopefully it's clear!
any refrence link
because I'm little bit confused
for how I deploy this empheral key func
๐
Hello ๐
Taking over as karllekko needs to step away soon
The error that you're getting, usually suggests that either
1/ The customer ID that you're setting doesn't exist
or
2/ You're using the wrong API key to retrieve the customer
Are you sure the customer ID that you're setting belongs to the account whose API key you're using for testing?
yes
can you share the customer ID?
{
"object": {
"id": "cus_MIq0QaKHmjkp6g",
"object": "customer",
"address": {
"city": "mohali",
"country": "IN",
"line1": "sdfsf",
"line2": "sdfdsf",
"postal_code": "160073",
"state": "PB"
},
"balance": 0,
"created": 1661327308,
"currency": null,
"default_currency": null,
"default_source": null,
"delinquent": false,
"description": "testing",
"discount": null,
"email": "sangeeta.zeroit@gmail.com",
"invoice_prefix": "CB9A59A4",
"invoice_settings": {
"custom_fields": null,
"default_payment_method": null,
"footer": null,
"rendering_options": null
},
"livemode": false,
"metadata": {
},
"name": "sangeeta",
"next_invoice_sequence": 1,
"phone": "+",
"preferred_locales": [
],
"shipping": null,
"tax_exempt": "none",
"test_clock": null
}
}
cus_MIq0QaKHmjkp6g
any idea
@fleet shell and @quasi lake
I'd highly recommend double checking the API key here, Don't think you're using the right one (from the right account).
Can you check if you're able to find a request ID for the request that's failing?
https://support.stripe.com/questions/finding-the-id-for-an-api-request