#mink4501_api

1 messages ยท Page 1 of 1 (latest)

dark krakenBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1220314188065275934

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

wheat forgeBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

blazing topaz
#

hi!

  1. Look at the discounts field on the related Invoice.
  2. Look at the trial_end on the related Subscription object.
crimson patio
#

For discounts, it's exposed even though the discount hasn't been applied yet.

#

we_1O7wcbH7t32LLKQxQZR1kbGe

#

evt_1OwiUKH7t32LLKQxpgQTTg1l

blazing topaz
#

can you expand on what you mean/the problem you're facing?

crimson patio
#
  1. i want to know when a payment is made on a subscription, if that payment is discounted. I'm not talking about the amount that will be applied in the future, but if the coupon was applied to the current payment.

  2. I want to know if the amount is 0 because of a Free Trial when the payment is completed on a subscription.

blazing topaz
#

I'm not talking about the amount that will be applied in the future, but if the coupon was applied to the current payment.
The presence of the discounts field on the related Invoice(of the payment) means that Invoice had a coupon applied.

#

so I think that answers that?

#

I want to know if the amount is 0 because of a Free Trial when the payment is completed on a subscription.
that doesn't really make sense since there's no payment if the "amount is 0", so what specifically are you referring to? If you mean the initial $0 that's generated when a trial starts, then as I answered โ€” you'd look at the related Subscription object and see if it has a trial period set. (invoice->subscription->trial_end).

crimson patio
#

If you call the checkout session API and you put in a trial period and you also put in a coupon, then inside the invoice.paid event there is a discount and the amount is $0. It's actually $0 because of the trial, not because of the discount.

blazing topaz
#

then in your logic you just need to check both of the fields I mention and implement that 'priority' yourself(if there's a trial and also a coupon, then your code would decide that the trial is the 'reason' for it being $0).

crimson patio
#

i see thank you

warped tiger
#

hello why I don't have permission to send messages in the dev-helop channel

#

@blazing topaz

blazing topaz
#

@warped tiger use the buttons in #help.