#rp

1 messages · Page 1 of 1 (latest)

fiery widgetBOT
lusty fulcrum
#

Hello! Let me take a look at that Subscription, hang on...

warm knot
#

thank you!

lusty fulcrum
#

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?

warm knot
#

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)

lusty fulcrum
#

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.

warm knot
#

Oh that makes sense, thank you!

#

Is that using the "on_behalf_of" field?

lusty fulcrum
#

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.

warm knot
#

Ah interesting ok

#

And gotcha, thanks for pointing to the destination parameter!

lusty fulcrum
#

Things should work as expected once you create the Subscription on your platform account. If not, let us know!

warm knot
#

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

lusty fulcrum
#

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.

warm knot
#

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

lusty fulcrum
#

Let me check...

warm knot
#

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!

lusty fulcrum
#

But I'm not 100% certain that will stop send_invoice emails, actually...

warm knot
#

Ah yeah I wasn't sure if that only stopped automatically sending finalized emails

lusty fulcrum
#

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?

warm knot
#

Yeah created via the API

lusty fulcrum
#

Although now I'm wondering if that Dashboard control is just how you toggle send_invoice...

warm knot
#

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)

lusty fulcrum
#

In that case the setting in the Dashboard I shared the screenshot of should do what you want.

warm knot
#

Ok great, I'll try that out, thanks again 🙂

#

appreciate your help! Glad this discord exists