#thepharmanest_api

1 messages ยท Page 1 of 1 (latest)

main ospreyBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

spare pollen
hazy snow
#

OK

#

HOW I CAN FIND ID?

spare pollen
#

In the response header of the API

hazy snow
#

req_tijU2b32fP0kUd

spare pollen
#

Thanks, but this request is successful.

hazy snow
#

POST/v1/payment_methods
Request ID
HTTP status code
200
Time
Jun 12, 2025, 4:13:53 AM
IP address
68.208.88.18
API version
2020-08-27
Origin
https://buy.stripe.com/
Idempotency key
ef33a048-9df9-4697-b0d3-1afbd1751422
User agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 Edg/137.0.0.0
API key

Stripe is a suite of APIs powering online payment processing and commerce solutions for internet businesses of all sizes. Accept payments and scale faster with AI.

spare pollen
#

To better assist you, we need a request Id that failed with the message you've shared above: Payment processing error: Unexpected token '<', "<!DOCTYPE "... is not valid JSON

#

What integration guide are you following?

hazy snow
#

Replit

#

is website builder

spare pollen
#

We know nothing about Replit unfortunately here...

hazy snow
#

amd they are experincing issue when integrating stripe with website

#

you can take my desktop remote to fix this issue

#

ok so how we can fix let me send you exact error once clicking on pay

spare pollen
#

Could you please share the full stacktrace ?

#

share some code snippets ?

hazy snow
#

I've added comprehensive request tracking with unique IDs for the Stripe technician.

When you click a payment button that fails, the server will now log:

Unique Request ID (format: timestamp-randomstring)
Complete request headers
Request body details
Response status and headers
Response content
Try clicking any subscription button now and share the Request ID from the server logs with the Stripe technician - this will help them trace exactly what's happening.

#

this is message from their agent

#

Payment processing error: Unexpected token '<', "<!DOCTYPE "... is not valid JSON

spare pollen
#

This is not enough sorry, to understand what happens behind and how Replit is interacting with Stripe APIs.

#

We need code snippets

hazy snow
#

did you check what is issue

#

he shared everything check above message

#

he shared you code snippets

spare pollen
#

If stripe retruns HTML instead of JSON, please share the corresponding request Id (req_...)

#

According to the code snippets, it returns correctly a checkout session cs_live....

hazy snow
#

I've created a debug page to capture the exact failure for the Stripe technician.

Please visit /debug-live-request.html and click "Trigger API Request". This will show:

The actual response our server sends (likely HTML instead of JSON)
The specific request ID from our server logs
The exact error message
The Stripe technician needs to see that our server endpoint is returning HTML when accessed via browser, but JSON when accessed via curl. This points to an Express routing/middleware issue, not a Stripe API problem.

#

You're absolutely right - let me clarify the issue. The problem is NOT that Stripe is returning HTML. The issue is that our Express server is returning HTML instead of JSON when the browser makes requests to our API endpoints.

#

message by website developer

spare pollen
#

You're absolutely right - let me clarify the issue. The problem is NOT that Stripe is returning HTML. The issue is that our Express server is returning HTML instead of JSON when the browser makes requests to our API endpoints.
Yeah they need to double check why your endpoint is returning HTML, it's not Stripe that is returning HTML.

hazy snow
#

can you check their server as i want this issue to fixed as soon as my clients will face issue

spare pollen
#

I can't share their server, we don't have access.

#

This channel is for Stripe questions only.

main ospreyBOT
hazy snow
#

ok just be here

harsh otter
#

fyi i'm taking over this thread!

hazy snow
#

Yeah they need to double check why your endpoint is returning HTML, it's not Stripe that is returning HTML.

#

are you still here

harsh otter
#

hi! yep i'm still here. it sounds like the developer you're talking to is saying it's an issue on their end

hazy snow
#

still talking to thgem wait

#

why this issue is coming up any idea

harsh otter
#

sorry, that error looks like the one that was coming up earlier and is probably related to Replit

#

as ou4m37 said earlier the request ID you shared is returning JSON, so something else in between stripe's API response and your browser is causing the problem

main ospreyBOT
manic scarab
#

hi! I'm taking over this thread. let me know if you have other questions.

hazy snow
#

check if you can find any issue

manic scarab
#

sorry we can't review your code like this.

#

if you have a specific question about this code, or a specific error message you need help with, I would be happy to help.

hazy snow
#

is there any other way i can link stripe to my website

manic scarab
#

what do you mean by "link"? accept a payment?