#ferx_api

1 messages · Page 1 of 1 (latest)

uneven bisonBOT
#

đź‘‹ 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/1390351294236987464

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

fair lava
#

Hi,
After extensive testing, here’s what I’ve found:

  • My backend and webhook endpoint are working correctly. When I manually resend events from the Stripe dashboard, they are received and processed (I see the expected logs and 200 OK responses).
  • However, when I create a new Checkout Session via my /obtain-plan endpoint and complete the payment using the generated checkout_url, no payment appears in my Stripe dashboard (neither in the Payments nor in the Events section).
  • As a result, no checkout.session.completed event is generated, and my webhook is never triggered for these new payments.
  • I have verified that I am using test keys and that my dashboard is set to “Viewing test data.” The webhook URL is correct and works for manual event resends.
  • I am using Stripe’s test card numbers and completing the payment flow all the way to the success page.
    Summary:
    Manual event resends from the dashboard reach my webhook, but real payments made through the generated Checkout Session do not appear in the dashboard and do not trigger any webhooks. It seems like the payment is not being registered by Stripe at all.
    Could you help me understand why these test payments are not being recorded or triggering events?
    Thank you!

Also I have a Dummy code to check this. Nothing related to a project.

#

STRIPE_WEBHOOK_SECRET = os.getenv("STRIPE_WEBHOOK_SECRET")
FRONTEND_URL = os.getenv("FRONTEND_URL", "https://ab72-186-87-28-20.ngrok-free.app")

@router.post("/obtain-plan")
async def obtain_stripe_plan():
stripe.api_key = os.getenv("STRIPE_SECRET_KEY")
session = stripe.checkout.Session.create(
payment_method_types=['card'],
line_items=[{
'price_data': {
'currency': 'usd',
'product_data': {'name': 'Test Product'},
'unit_amount': 1000,
},
'quantity': 1,
}],
mode='payment',
success_url='https://example.com/success',
cancel_url='https://example.com/cancel',
)
return {"checkout_url": session.url}

@router.post("/webhook")
async def stripe_webhook(request: Request, stripe_signature: str = Header(None)):
print(">>> ENTRĂ“ AL ENDPOINT /webhook <<<")
return {"received": True}

oblique junco
#

Hey there, can you share an example checkout session that you created and completest test payment for?

#

Or you can do a new one right now and i can follow along 🙂

#

Please share the session id like: cs_test_123

fair lava
#

Hi, thank you so much for your disposition. Already solved.