dance-engine / dance-engine/the-engine

Stripe checkout processing fails if no payment intent present on the cs object

Open
#103 0 comments 0 reactions 1 assignee Claimed by @connorkm2 View on GitHub
bug
Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Someone tried to buy a ticket with a coupon code that made the product free. Therefore, not payment was collected.

```
[INFO] 2026-04-11T14:10:39.305Z 93442942-1a45-4e32-ae99-603202cbc2d7 Received checkout.session.completed event.
[INFO] 2026-04-11T14:10:39.305Z 93442942-1a45-4e32-ae99-603202cbc2d7 Handling completed checkout session.
[INFO] 2026-04-11T14:10:39.306Z 93442942-1a45-4e32-ae99-603202cbc2d7 message='Request to Stripe api' method=get url=https://api.stripe.com/v1/checkout/sessions/cs_live_b1A02pXswWd5Z4mAlHnTDbTVY2H0raGFte6t4uPeMTYvZ7t2Ptlo4aSJuX?expand[0]=line_items&expand[1]=payment_intent
[INFO] 2026-04-11T14:10:39.763Z 93442942-1a45-4e32-ae99-603202cbc2d7 message='Stripe API response' path=https://api.stripe.com/v1/checkout/sessions/cs_live_b1A02pXswWd5Z4mAlHnTDbTVY2H0raGFte6t4uPeMTYvZ7t2Ptlo4aSJuX?expand[0]=line_items&expand[1]=payment_intent response_code=200
[INFO] 2026-04-11T14:10:39.765Z 93442942-1a45-4e32-ae99-603202cbc2d7 Organisation: power-of-woman, Event KSUID: 3BAqYwmGde5YJzzPeHLJqVo37Fo
[INFO] 2026-04-11T14:10:39.766Z 93442942-1a45-4e32-ae99-603202cbc2d7 Current Time: 2026-04-11T14:10:39.766Z
[ERROR] 2026-04-11T14:10:40.014Z 93442942-1a45-4e32-ae99-603202cbc2d7 Error handling completed checkout session: 'NoneType' object has no attribute 'get'
[ERROR] 2026-04-11T14:10:40.015Z 93442942-1a45-4e32-ae99-603202cbc2d7 Traceback (most recent call last):
File "/var/task/functions/checkout/lambda_checkout.py", line 411, in completed
"payment_reference": stripe_checkout.get("payment_intent", {}).get("id"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.