#bhumika17-subscription

1 messages · Page 1 of 1 (latest)

sullen rapids
#

can you explain what "got end subscribe date" means and share the code you use to "get" that or what exactly you are looking at?

whole copper
#

ok

#

{
"id": "sub_1KdtYbBwfm5SePU9fN93pasE",
"object": "subscription",
"application_fee_percent": null,
"automatic_tax": {
"enabled": false
},
"billing_cycle_anchor": 1647424457,
"billing_thresholds": null,
"cancel_at": null,
"cancel_at_period_end": false,
"canceled_at": null,
"collection_method": "charge_automatically",
"created": 1647424457,
"current_period_end": 1678960457,
"current_period_start": 1647424457,
"customer": "cus_LKVgHWYXxiFLHa",
"days_until_due": null,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
"discount": {
"id": "di_1KdtYbBwfm5SePU9SdsKjffn",
"object": "discount",
"checkout_session": null,
"coupon": {
"id": "ERtk9H85",
"object": "coupon",
"amount_off": null,
"created": 1645598530,
"currency": null,
"duration": "forever",
"duration_in_months": null,
"livemode": false,
"max_redemptions": null,
"metadata": {},
"name": "TEST30",
"percent_off": 30,
"redeem_by": null,
"times_redeemed": 3,
"valid": true
},
"customer": "cus_LKVgHWYXxiFLHa",
"end": null,
"invoice": null,
"invoice_item": null,
"promotion_code": null,
"start": 1647424457,
"subscription": "sub_1KdtYbBwfm5SePU9fN93pasE"
},

#

see this is my yearly coupon applied subscribe response

sullen rapids
#

ok

#

sure, why is that unusual?

#

that is not the end date of the subscription period.

#

that would be current_period_end on line 15

whole copper
#

this is monthly coupon applied subscribe response

#

oh

#

but see i will explain you

sullen rapids
#

what you're highlighting is the end date of the discount

#

and in your first example you're using a 30% off forever coupon

#

so it has no end date

whole copper
#

oh

sullen rapids
#

your other example is a 50% off coupon for 3 months so the discount had an end in 3 months

whole copper
whole copper
sullen rapids
#

yep!

#

why is that unusual or confusing?

#

it's a monthly subscription. So the current period is now, 16th Mar -> 16 April

whole copper
sullen rapids
#

16th April?

#

it has nothing to do with the coupon

#

it's defined by the Plan/Price you create the subscription with. If you create a subscription using a monthly plan, the current_period_end is today+1 month

whole copper
#

oh oh ok

#

but see

whole copper
#

stripe automatic update my subscribe plan? on 15 April

#

or need to do something from my end?

sullen rapids
#

you don't have to do anything

whole copper
#

hmmm ok let me check

actually i was confused on end & current_period_end date because my 2 user's has face this issues, they have running on coupon period(3 months) but after 1 month they can't access their account

sullen rapids
#

that is probably an issue on your side though, Stripe doesn't control your own concept of accounts and what your customers can access, that is your own code, Stripe just does the payments and notifies you of when the subscription is paid for

whole copper
#

yes sure

sullen rapids
#

to be clear, when I say "you don't have to do anything", you do have to update your database or whatever so the customer still has access. They get charged by Stripe each month and you should extend access to your service based on the payments they make. I just meant you don't have to explicitly tell Stripe to process the payment or anything like that.

whole copper
#

ok thank you