#rp
1 messages · Page 1 of 1 (latest)
Hello! Let me take a look at that Subscription, hang on...
thank you!
I think it might be because you're setting cancel_at when you create the Subscirption, which indicates that a cancelation has been requested for the future. Not sure about that and will work on confirming, but wanted to ask in the meantime if omitting cancel_at changes the behavior?
Ah interesting, I'll give that a try
We would like to have the behaviour where it auto cancels at that set point in the future though
(just not in the middle if payments fail)
Oh, hang on, I think the primary issue is that you're creating this Subscription on a Custom connected account. That's not recommended. The Custom account has no Dashboard access, so you can't change the "mark as unpaid" setting; it's probably just falling back to the default behavior which I believe is to cancel it.
You should instead create this Subscription on your platform account and set the Custom account as the destination for the funds.
Direct charges are not recommended for Custom accounts for this and a variety of other reasons.
Oh that makes sense, thank you!
Is that using the "on_behalf_of" field?
The docs might need an update then, they say "Setting past_due subscriptions to unpaid is the default behavior because it gives you the most options for reactivating subscriptions." https://stripe.com/docs/billing/subscriptions/overview
The on_behalf_of field sets the merchant of record, and is something you may or may not want to do. The destination parameter is under transfer_data: https://stripe.com/docs/api/subscriptions/create#create_subscription-transfer_data
Ah, sorry, I wasn't clear earlier. I think the default for Custom accounts is to cancel them, but for regular accounts with Dashboard access it's to mark them unpaid. I'll double-check though.
Things should work as expected once you create the Subscription on your platform account. If not, let us know!
Will try that now, thanks again.
Had one more question with testing - the docs say "Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.". 1 I noticed that in the dashboard though if I click send invoice it'll send an email to the customer, is that special behaviour for the dashboard only?
Context: I'd like to have the test mode subscriptions send an actual email once they finalize/send an invoice (when using collection method send_invoice), to make it easier to test from an end user perspetive. Wondering if that's possible
Yep, the Dashboard behavior is unique to the Dashboard. Those emails won't send in test mode via the API, and there's no way to make that happen. Your best bet is to listen for the invoice.sent Event and, optionally, send your own test email as a result.
Got it, thank you. Is there a way then that I can disable Stripe sending the email in live mode as well? I'd like to keep the behaviour of the two consistent as much as possible
I see the option in the dashboard, but didn't find a field on the create subscription docs
Let me check...
i.e. if I'm listening for invoice.sent and sending emails manually, I'd like to do that for both test mode and live mode
thank you!
I think it's this setting here: https://dashboard.stripe.com/settings/billing/automatic
But I'm not 100% certain that will stop send_invoice emails, actually...
Ah yeah I wasn't sure if that only stopped automatically sending finalized emails
Like if you explicitly choose the "send email" option in the Dashboard in your screenshot I'm pretty sure we send an email regardless, because that's what you explicitly selected in the Dashboard.
But are you asking about Invoices/Subscriptions created via the API?
Yeah created via the API
Although now I'm wondering if that Dashboard control is just how you toggle send_invoice...
I'd like to create subscriptions with collection method send_invoice using the API, but not have Stripe send the email to the customer. Since Stripe doesn't do it in test mode, I'd like to listen for invoice.sent /invoice.finalized and send the email myself (in both test mode and live mode for consistency)
In that case the setting in the Dashboard I shared the screenshot of should do what you want.