#surajpatidar
1 messages · Page 1 of 1 (latest)
hello, what's your question?
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
can you provide the relevant request id for each scenario that you've mentioned?
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
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?
but in webhook i hava print
event.data
both show discount null
req_8a55AhmiX8GOUI
It's a one-time coupon only applied to the initial invoice, so it's not set on the Subscription object
JrwsmEDs
this coupon not one time
It is – it has duration: 'once' set meaning it's only applied to one billing period: https://stripe.com/docs/billing/subscriptions/coupons#coupon-duration
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
but i have create two new and i have applied different coupons but it show null
You need to share example requests. In the example you shared above, you used a one-time coupon so what you see is expected
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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
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
okay no problem but now i have create new user and new coupon but still show none
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
check this
i have create new coupon and new user and create subscription with this invoice show discounted but virable show null why
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
check this invoice
Again, a duration: 'once' coupon was applied: https://dashboard.stripe.com/test/logs/req_eNyl5v0ILqGmgi
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Exactly the same as before
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
I can only explain this so many times
where in the many time
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)
if coupon once time then i have use only one time but that time it show discount null
The discount field on the Subscription object reflects any discounts that will apply to future periods. In thise case, none
but when i applied one billing why it show discount null
I've explained this at least twice now