#HM-invoice

1 messages ยท Page 1 of 1 (latest)

brave mauve
#

hello @solemn abyss ! Can you share the request id for me to take a closer look?

solemn abyss
#

@brave mauve Here is my test code ๐Ÿ™‚

brave mauve
#

Just as a reminder, you should never share your secret API keys, regardless of whether it's a test or live mode key. You may want to roll your test mode key immediately as the one you sent is now considered compromised: https://dashboard.stripe.com/test/apikeys

solemn abyss
#

Okay thanks I'll change the test API key. I'll be careful.

brave mauve
#

i see that you were using cus_KuyqiChzw3PEth, let me take a quick look and get back to you

solemn abyss
#

okay thank you๐Ÿ™

brave mauve
#

if i understood your question correctly, you have a subscription, and you want to check the datetime of when the subscription will be invoiced next?

solemn abyss
#

@brave mauve right~!

#

I want to display the datetime on customer's browser

brave mauve
solemn abyss
#

@brave mauve For example, current_period_end is '2022-02-13 03:46:56'. It means next invoice will be created "2022-03-14 00:00:00" and charge customer's payment?

#

or on '2022-03-13 03:46:56'?

brave mauve
#

if current_period_end is '2022-02-13 03:46:56'. It means next invoice will be created ~'2022-02-13 03:46:56' -> there may be some delay when the invoice is created and finalized

solemn abyss
#

May I inform the customer that they will be invoiced and charged on 02/13/2022? (May be I setted 'auto_charged' option)

Am I understanding correctly?

#

It may be delay, so I will do not display time.

brave mauve
#

hmmm, i think there's a chance that if they started their subscription close to midnight, if there's a delay, they may be charged the following day

#

you may want include a warning or some info that informs the user that there may be instances where the charge is delayed slightly, i think it should be fine

solemn abyss
#

hm.. okay, I will do that ๐Ÿ™‚
Thank you @brave mauve

solemn abyss
#

I have a webhook.
When the next invoice is charged, does the webhook event type come in as 'subscription_schedule.created'?

brave mauve
#

maybe the first question is, what are you trying to do?

solemn abyss
#

My customer have a subscription and paid it.(auto charged). If my customer payment "next invoice", what is do I receive the event response 'type' by webhook?

'subscription_schedule.created' right..?

brave mauve
#

maybe let me rephrase my question, what are you trying to do after you receive this event?

#

that'll help me be able to better advise you

solemn abyss
#

A customer pays the next invoice. Then we will give that customer our points when we receive the webhook's response.

brave mauve
solemn abyss
#

I was debating between "subscription schedule.created" or "subscription schedule.created". I will proceed with "invoice.paid" Thank you!!

brave mauve
#

i was thinking that you would provide them points every time they pay an invoice right?

#

this isn't only limited to the first time a subscription is created

solemn abyss
#

if one customer create a subscription, we give customer points for each month when create invoice for that subscription once a month.

#

so how I know my customer paid invoice for subscription once a month by webhook?

brave mauve
#

is your subscription monthly?

solemn abyss
#

yes right

#

"plan": {
"active": true,
"aggregate_usage": null,
"amount": 5000,
"amount_decimal": "5000",
"billing_scheme": "per_unit",
"created": 1638259085,
"currency": "usd",
"id": "price_1K1RE1EhcKQZEEpHRx6yObTg",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {},
"nickname": null,
"object": "plan",
"product": "prod_Kgorr1N0UYikOS",
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},

#

"interval" is setted "month"

brave mauve
#

then it makes sense to use invoice.paid

solemn abyss
#

thank you so much!