#addyPaladin-subscription
1 messages · Page 1 of 1 (latest)
Ok
sub_1La8xoIzYqTTKc50jUEXKliL
It says that no coupon applied but in API i am sending the coupon 🧐
what's the request id where you applied the coupon?
it'd look like req_xxx [0]
[0] https://support.stripe.com/questions/finding-the-id-for-an-api-request
but there's no coupon applied in that request
Yes exactly I checked but I don't know why it is attaching the discount coupon on the subscription
sorry but i'm not sure i understand what you're saying. If you look at the request body, there was no discount included : https://stripe.com/docs/api/subscriptions/create#create_subscription-coupon
nor is there a promotion_code : https://stripe.com/docs/api/subscriptions/create#create_subscription-promotion_code
but you mentioned you're passing in a discount coupon?
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
if you log coupon just before you create the subscription, what's the output?
The complete coupon object. If you want to see I can print the log for you