diff --git a/endpoints/webhooks.py b/endpoints/webhooks.py index d8fa1e7e4..bf32c53d2 100644 --- a/endpoints/webhooks.py +++ b/endpoints/webhooks.py @@ -30,7 +30,7 @@ def stripe_webhook(): event_type = request_data['type'] if 'type' in request_data else None if event_type == 'charge.succeeded': - invoice_id = ['data']['object']['invoice'] + invoice_id = request_data['data']['object']['invoice'] if user and user.invoice_email: # Lookup the invoice.