diff --git a/uncloud/uncloud_pay/stripe.py b/uncloud/uncloud_pay/stripe.py index 7dc53c6..ab3eac2 100644 --- a/uncloud/uncloud_pay/stripe.py +++ b/uncloud/uncloud_pay/stripe.py @@ -75,9 +75,7 @@ def get_customer_id_for(user): try: customer = create_customer(user.username, user.email) uncloud_stripe_mapping = uncloud_pay.models.StripeCustomer.objects.create( - owner=user, - stripe_id=customer_request['response_object']['id'] - ) + owner=user, stripe_id=customer.id) return uncloud_stripe_mapping.stripe_id except Exception as e: return None