#surajpatidar

1 messages · Page 1 of 1 (latest)

bright nebulaBOT
placid haven
#

hello, what's your question?

frail vine
#

i have apply coupon in subscription create time some time it respone discount null and some time disocunt with coupon why

#

if i have apply coupon why it not response same

placid haven
#

can you provide the relevant request id for each scenario that you've mentioned?

frail vine
#

req_8a55AhmiX8GOUI

#

"application": null,
django_1 | "application_fee_percent": null,
django_1 | "automatic_tax": {
django_1 | "enabled": false
django_1 | },
django_1 | "billing_cycle_anchor": 1692256051,
django_1 | "billing_thresholds": null,
django_1 | "cancel_at": null,
django_1 | "cancel_at_period_end": false,
django_1 | "canceled_at": null,
django_1 | "cancellation_details": {
django_1 | "comment": null,
django_1 | "feedback": null,
django_1 | "reason": null
django_1 | },
django_1 | "collection_method": "charge_automatically",
django_1 | "created": 1692256051,
django_1 | "currency": "usd",
django_1 | "current_period_end": 1694934451,
django_1 | "current_period_start": 1692256051,
django_1 | "customer": "cus_OSw72PeOPgSlHi",
django_1 | "days_until_due": null,
django_1 | "default_payment_method": null,
django_1 | "default_source": null,
django_1 | "default_tax_rates": [],
django_1 | "description": null,
django_1 | "discount": null,
django_1 | "ended_at": null,

#

it show discount null

placid haven
#

that's your DB, i don't know why it's showing discount as null - where are you expecting to see this value in the response from Stripe? Can you give an example request id where you're seeing the coupon value in the response from Stripe?

frail vine
#

but in webhook i hava print

#

event.data

#

both show discount null

#

req_8a55AhmiX8GOUI

polar delta
#

It's a one-time coupon only applied to the initial invoice, so it's not set on the Subscription object

frail vine
#

JrwsmEDs
this coupon not one time

polar delta
#

Therefore we applied the discount to the initial invoice for the subscription, but it's not set on the subscription itself as it has essentially been redeemed

frail vine
#

but i have create two new and i have applied different coupons but it show null

polar delta
#

You need to share example requests. In the example you shared above, you used a one-time coupon so what you see is expected

frail vine
#

if coupon not apply then why it show discount

#

one user use different two coupons

#

for subscription

#

and subscription show discounted then why it show None

polar delta
#

As I explained, as it's a coupon withduration: 'once' we will apply the appropriate discount to the initial invoice. However after that it is considered redeemed (i.e. it won't apply to future invoices), so it's, not set on the Subscription object

frail vine
#

okay no problem but now i have create new user and new coupon but still show none

#

check this

#

i have create new coupon and new user and create subscription with this invoice show discounted but virable show null why

#

check this invoice

polar delta
#

Exactly the same as before

frail vine
#

but i have applied first time

#

then why it show null

#

duration once right

#

this coupon duration once and i apply first time only then why it show discount null and invoice show discounted

polar delta
#

I can only explain this so many times

frail vine
#

where in the many time

polar delta
#

We apply the coupon and create a discount on the initial invoice – at that point it is considered used as it is a once coupon (i.e. only apply to one billing period/invoice)

frail vine
#

if coupon once time then i have use only one time but that time it show discount null

polar delta
#

The discount field on the Subscription object reflects any discounts that will apply to future periods. In thise case, none

frail vine
polar delta
#

I've explained this at least twice now