#b33fb0n3
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
It depends how exactly the Subscription gets cancelled, but you can always listen to customer.subscription.updated: https://stripe.com/docs/api/events/types#event_types-customer.subscription.updated
Second question: can I somehow disable the invocies for the subscriptions? The customer don't want to get the invocies. Not for the first and also not for the second, third, ...
And check for status attribute.
what about the creation?
You mean disable the sending of Invoices?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yeah
ah thats easy. Can I then just use these two events:
https://stripe.com/docs/api/events/types#event_types-customer.subscription.created
Whenever it's created AND paid?
https://stripe.com/docs/api/events/types#event_types-customer.subscription.deleted
Whenever it's canceled, or unpaid, ... no more payments?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
created AND paid
It depends how you create the Subscription, it might be in the pending state. Stillcustomer.subscription.updatedis the best choice.
It's best to listen to all of those events, and then just check the status attribute in all handlers.
yeah, I think so too, but for me it's a little confusing, what I should do with all of these events: incomplete, incomplete_expired, trialing, active, past_due, canceled, or unpaid
For me the only thing thats important: when I get money, I can read that and be able to do something and the same thing for when I won't get money. All the other things are covered with this setting. You know what I mean? But what kind of status should I listen to?
It would help me if you just say
%status%: add to customer (when money comes)
%status%: remove from customer (when no more money comes)
I would suggest also listening to invoice.paid for successful attempts and invoice.payment_failed.
then I would listen to ALL invoices, right?
How are you creating the Subscription? With collection_method: charge_automatically? https://stripe.com/docs/api/subscriptions/create#create_subscription-collection_method
Yes, but you can check if it has subscription property in the payload.
with a paymentlink, that belongs to a price
I don't want to use invoices. I would like to not send them to the customer. Can I somehow do that? Not the first invoice, not the second, ...
I just read this: When the status of a subscription changes to canceled or unpaid, you revoke access to your product.
Is there such a description also for "grant access to the product now"?
Sorry, I think Discord had some issues, we're back now.
I think so too, my messages are delayed... 🤔
Invoices are created by a Subscription, but you can opt-out from sending them to the Customer. Do you mean the payment receipts actually?
When the status is active, you can grant access to your product.
yes both. I don't want to send anything to the customer. Maybe the "hey your subscription is now active" or something like that, but nothing with any payment stuff
alright, and that will be called when the customer created the subscription and paid, right?
You need to disable receipts from your Dashboard then: https://dashboard.stripe.com/settings/emails
Yes, that will be the status.
I would disable all emails also for normal paymentintents, right?
and I would listen what you mentioned customer.subscription.updated right?
Yes
Yes
ok, 2 questions:
- Can I disable them ONLY for the subscription?
- Can I somehow add the payment method "SEPA" ONLY to this subscription? When I click on "configure" at the subscription in the dashboard then I will be ask to activate it in the payment methods. But my normal API integrated payment intents should not be able to use SEPA
- No, unfortunately.
- You can configure the allowed payment methods with
payment_method_typesparameter: https://stripe.com/docs/api/payment_links/payment_links/create#create_payment_link-payment_method_types
- sounds great. That will overwrite the setting from the dashboard when it's not activated in the dashboard?
Yes
nice, you helped me a lot, thanks!
Happy to help!