#Jahan Zaib
1 messages · Page 1 of 1 (latest)
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
According to the error message, you are making this request with a Live key and not a secret key
No I used test stripe keys while creating the test reservation
Can you share the requestId?
You need to double check this.
Just give me a sec
I need to create a test reservation again. Just give me 5 minutes
Yes of course, take your time
I cannot send you request Id because I've no access to Stripe account
You can find it in the response header.
There also no such thing is found only this message is coming from API when reservation is creating
According to you what could be the possible reason for that message.
Check the API response headers, you must find a requestId as a header value:
https://stripe.com/docs/api/request_ids
You are using a live key to access a live key, that's what I can tell... you need to double check your var envs (if you are using one)
let me check
{
"id": "cus_O0ADSkKAEGYJ0W",
"object": "customer",
"address": null,
"balance": 0,
"created": 1685619708,
"currency": null,
"default_source": null,
"delinquent": false,
"description": null,
"discount": null,
"email": null,
"invoice_prefix": "13D95534",
"invoice_settings": {
"custom_fields": null,
"default_payment_method": null,
"footer": null,
"rendering_options": null
},
"livemode": false,
"metadata": {},
"name": null,
"next_invoice_sequence": 1,
"phone": null,
"preferred_locales": [],
"shipping": null,
"tax_exempt": "none",
"test_clock": null
}
This is the response body and not the response headers.
This data is coming when I used the stripe test keys in this given endpoint
before the json object you must be seeing lines, like:
date: Thu, 01 Jun ....
content-type: application/json
....
there is a line starting with request-id:
those are the response Headers.
yeah I know about it but there's no such request-id is showing to me.
Can you share the curl you are making ? and print all the output lines (hide your secret key)
curl https://api.stripe.com/v1/customers
-u sk_test_4eC39HqLyjWDarjtT1zdp7dc:
-D "-"
-X POST
I used this Curl call
I just run this request and I got a request-id
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
Can you please run the request that gave you the original error and share the Request ID req_xxx? https://support.stripe.com/questions/finding-the-id-for-an-api-request
It's very hard to investigate without it.
When I Import the above curl in postman then it only given me this response
{
"id": "cus_O0ADSkKAEGYJ0W",
"object": "customer",
"address": null,
"balance": 0,
"created": 1685619708,
"currency": null,
"default_source": null,
"delinquent": false,
"description": null,
"discount": null,
"email": null,
"invoice_prefix": "13D95534",
"invoice_settings": {
"custom_fields": null,
"default_payment_method": null,
"footer": null,
"rendering_options": null
},
"livemode": false,
"metadata": {},
"name": null,
"next_invoice_sequence": 1,
"phone": null,
"preferred_locales": [],
"shipping": null,
"tax_exempt": "none",
"test_clock": null
}
Here it added the stripe secret key in Basic Auth username where I replace this with our test stripe secret key
I think I'm doing something wrong or not doing it correctly so can you guide me about it.
What request has returned the original error?
paymentProviderMessage":"No such paymentmethod: ...
Check the Headers response tab in postman.
yes it returned this error when I created a test booking using test stripe keys
In headers this is showing
That's request headers.
req_R0YBSWLvGD6Fj2
Now I got it you both were talking about response header not request header 🥺
Sorry for misunderstanding.
This request seems to be successful, could you please get the request ID from the one that gives the error?
How I can get it because I've no access to Stripe account ?
The error occurred when the reservation created although i used the same stripe test keys for test reservation but it still give this error
( paymentProviderMessage":"No such paymentmethod: 'pm_1NE8dcFZF7COZEKqz0amw7at'; a similar object exists in test mode, but a live mode key was used to make this request )
Here it's saying live mode keys were used but I used test keys for it.
You will need to ask for the request ID from whoever owns the account, because otherwise it's very hard for us to help.
I think the most likely thing here is that you are mixing up keys. Do you have multiple accounts?
yes we've integrated multiple stripe accounts but for both sides stripe test keys are added.