#addyPaladin-subscription

1 messages · Page 1 of 1 (latest)

gusty pendant
#

hello! can you share the subscription id which you've added this coupon to?

long spire
#

Ok

#

sub_1La8xoIzYqTTKc50jUEXKliL

#

It says that no coupon applied but in API i am sending the coupon 🧐

gusty pendant
#

what's the request id where you applied the coupon?

long spire
#

Let me check

#

req_b2HbrqUXDzzU5q

gusty pendant
#

but there's no coupon applied in that request

long spire
#

Yes exactly I checked but I don't know why it is attaching the discount coupon on the subscription

gusty pendant
#

but you mentioned you're passing in a discount coupon?

long spire
#

Yes you can look above in my code I am passing the discount coupon

#

subscription_id = stripe.Subscription.create(
customer=billing_object.stripe_customer_id,
items=[
{"price": price_object.get("id"),
"quantity": validated_data["basic_quantity"]},
],
coupon=coupon,
cancel_at_period_end=validated_data["cancel_at_period_end"],
payment_behavior="default_incomplete",
expand=["latest_invoice.payment_intent"],
)

#

coupon=coupon

gusty pendant
#

if you log coupon just before you create the subscription, what's the output?

long spire
#

The complete coupon object. If you want to see I can print the log for you

gusty pendant
#

the coupon parameter is expecting the coupon's id

#

you shouldn't be passing in an object