#Soba-coupon

1 messages · Page 1 of 1 (latest)

oak flame
lucid belfry
#

Hi River! Thank you for your quick reply. The thing is I am trying to create a new subscription with the coupon applied to it. Are you saying that I should create the subscription first and then apply the coupon using subscription.update?

#

@oak flame

oak flame
#

I misunderstand your question by updating the coupon to existing subscription

#

Can you share the error that you saw when trying to apply coupon to new subscription?

lucid belfry
#

Thats the thing, there isn't an error message - the coupon is simply not applied

#

this is the coupon object that i am using

oak flame
lucid belfry
#

req_XMUQLWw6v4NHu5

#

i believe its this!

oak flame
#

The discount was applied to its invoice: in_1L3AdPLxAnOEk7ORAnip8rYq

#

What is the behaviour that you're expecting?

lucid belfry
#

ohhh i see, thats my bad then - I thought that there would be an indication of the application of the discount on the response object of "stripe.subscription.create"

#

so in order to validate that the coupon was applied, I have to use the latest_invoice field on the response, retrieve the invoice through the Invoice API, and then check the data there?

oak flame
dusk umbra
lucid belfry
#

Ah I see! Thank you both @oak flame and @dusk umbra :)

#

Much appreciated!!!