#elBR
1 messages · Page 1 of 1 (latest)
Hi there, yes it's possible.
https://stripe.com/docs/api/coupons/create#create_coupon-duration when you create a coupon, you can set its duration to once so that it's only applied to the first charge from a subscription.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but I don't want the coupon to be duration: once
I want it to be forever so that my customer can use it multiple times
but for one subscription it must be applied only to the first invoice
The param name can be a bit confusing. Setting a coupon's duration to once doesn't mean that the coupon can be used once. It specifies how long the discount will be effect when used in a subscription.
You can still reuse the same coupon with many customers.
ok, but the problem is that if for example of my customer came across a coupon that is not "once" and apply that I will be getting side effects
so I want a way to be more secure even in cases the customer applies a coupon that is not "once"
you understand my need?
Hey! Taking over for my colleague. Let me catch up.
but the problem is that if for example of my customer came across a coupon that is not "once" and apply that I will be getting side effects
Could you please give more details about what side effects you are thinking about here ? why are you creating coupon that are not "once" and your use case seems to require coupon with "once" duration?
Between, do you check the coupon promotions code? you can use them to create a promotion code by customer. In other word, it can be applied only by a customer:
https://stripe.com/docs/billing/subscriptions/coupons#promotion-codes
https://stripe.com/docs/api/promotion_codes/create#create_promotion_code-customer
because by mistrake I can create a copon that is not "once"
and even if I do that I want to ensure that the customer will use it only for the first invoice
If you create a coupon that is not once by mistake then you need to delete it.
Or you can add in your database a double check on coupons used by customer
yeah of course
If my app returns an error after a webhook event in test mode after which time it will be sent again and how many times?
and is it the same for test and live?
does it have a max number of times? and what happens if the limit of retries is reached
In live mode, Stripe attempts to deliver your webhooks for up to three days with an exponential back off
...
In test mode, Stripe retries three times over a few hours
...
In live and test mode, Stripe will attempt to notify you of a misconfigured endpoint via email if an endpoint has not responded with a 2xx HTTP status code for multiple days in a row. The email also states when the endpoint will be automatically disabled.
Further details can be found here:
https://stripe.com/docs/webhooks/best-practices#events-and-retries
do I get the event object in the email so that I know the event?
In the email, you get the related endpoint, then you can find the failed delivered event in your dashboard:
https://dashboard.stripe.com/test/events
https://dashboard.stripe.com/events
but can I manually resend the event if it fails?
Yes, you can do that using stripe-cli:
https://stripe.com/docs/cli/events/resend
can I send though dashboard directly?
also, I want a way to check if the event was successful or not. Here I do not see any status
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You can find the status of the event per webhook in the details page of that Event:
https://dashboard.stripe.com/test/events/evt_123
Hi! I'm taking over this thread.
can I send though dashboard directly?
Yes in the dashboard you can re-send failed events by clicking on the "resend" button.
ok thanks
I wanted to ask, is there a way that Stripe can restrict a customer to have two subscriptions?
I want to customer to have just one subscription
We don't have a setting for that. But that's something you could do on your end: only create a new subscription if the customer doesn't already have one.
ok
if an invoice remains open for a certain amount of time, does it automatically gets deleted by Stripe?
No the invoice will stay open, unless the customer pays or you mark it as uncollectible or void.
You can learn more about invoice status here: https://stripe.com/docs/invoicing/overview#invoice-statuses
once I update an invoice to "void", it cannot be again changed to "open", correct?
Correct!
can a subscription be passed to incomplete, once paid the first invoice?
is the incomplete status referring that the first invoice isn't paid yet? Or the subscription can pass to that status at some point in the future too?
is the incomplete status referring that the first invoice isn't paid yet?
Correct
can a subscription be passed to incomplete, once paid the first invoice?
Nope. But it could move topast_dueorunpaid.
You can learn more about subscription status here: https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses