#mclowrider_api

1 messages · Page 1 of 1 (latest)

placid pondBOT
#

👋 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/1493571935928586252

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

sand birch
#

👋 happy to help

sullen bay
#

Thanks tarzan

sand birch
#

I'm a bit confused, the subscription you shared doesn't have any invoice that was void

#

the subscription is cancelled

sullen bay
#

Sorry, no it doesnt. We want to implement a fix. And voiding the invoice seems to be the recommended approach?

#

We wanted to verify how it would impact a payment attempt. Especially sepa_debit payments that take days to process

sand birch
#

a fix for what exactly?

#

voiding an invoice doesn't make it unpayable if that's what you're asking

sullen bay
#

Ah yes. Even though the customer's subscription was cancelled, their payment was still processed.

sand birch
#

yes

sullen bay
#

Thats the exmaple I sent.

sand birch
sullen bay
#

We essentially want to ensure no payment is taken when the subscription is canclelled

sand birch
#

there is no direct effect on cancelling the subscription to the invoice payment

sullen bay
#

Understood.

sand birch
#

the only thing you can do is to refund the invoice once its paid, especially for the async payment method types such as sepa_debit

sullen bay
#

It pauses future attempts if I read the docs a while back correctly.

#

So, in progress attempts for sepa_debit cannot be stopped?

#

I've been recommended the void invoice approach previously by another agent but that was for a card payment method which sounds sync based on your message?

sand birch
sullen bay
#

Doc say this.

sand birch
#

but if there was an attempt that started, you can't cancel that

#

which is the case with async PMs

sullen bay
#

Aaah, I see.

#

So we have to wait till the attempt is complete? Is there any documentatio we can refer to with regards to sync/async PMs?

#

The documentation request is just to help us understand them better and save me coming back for this with another payment method. You've given me some good information already thankyou

#

Also are there any others gotchas to be aware of around sepa_debit invoice payments?

sullen bay
#

Maybe that's an ambiguous question. We'll can use the docs or return here if we need support.

#

Was thinking if there was anythting else like this one I raised that other customer have experienced when processing sepa_debit subscription invoices

sand birch
#

nothing top of mind tbh

placid pondBOT
sullen bay
#

One more thing. Welcome dougal. Is there a process in place to migrate test mode to sandboxes?

#

We cannot utilise new features like Event bridge destinations and Stripe workflows, as we are integrated with test mode, and it would be a huge effort to migrate our systems over two accounts to a sandbox. It's stopping us from using those features, which would greatly reduce the effort to integrate new Stripe events.

haughty wing
#

👋 I don't believe there's any automated way to migrate data between test mode and sandboxes, generally the approach is to rebuild the data needed in new sandboxes. Just checking to see if there is any other options, bear with me

#

Afraid not, it seems to require a manual process

sullen bay
#

Ah ok. How are other customers dealing with this?

#

Also, your colleague said that once async payments have started processing, they cannot be stopped. Looking at the docs they sent me, it says 👇🏾

You can cancel a PaymentIntent in the processing state when the associated payment method is ACH, ACSS, AU BECS, BACS, NZ BECS or SEPA.

#

In the SEPA docs, it says this

`Payment timing and failures
Most SEPA Direct Debit payment failures occur within 6 business days of initiation. The following timeline describes how payments are processed:

Submission phase (1-2 business days)

Your payment is submitted to the customer’s bank.
Payments created before the daily cutoff time (10:30 CET) are submitted the same day.
Payments made after the cutoff are submitted the following business day.
Refusal window (5 business days)

After submission, there is a 5-business-day period (the “refusal window”) during which the customer’s bank can reject the payment. This is when most failures occur.
The bank can return the payment during this period.
Final settlement

After the refusal window, the payment appears as successful.
In rare cases, payments can still fail after this point and appear as disputes.`

#

Based on this, during which phase can we cancel the payment intent? And if the payment intent has already succeeded, will an invoice payment succeeded event be fired?

We are wondering how we best stop SEPA payment attempts in progress. Is it a case of we cant and we just refund or can we attempt to stop the processing? If we try to stop the processing but the customer get charged anyway, would the invoice payment succeeded event fire to notify us of this?

#

I know its a lot information I've sent there so I appreaciate your patience thankyou

haughty wing
#

Sorry for the delay, yes, it's technically possible to attempt to cancel a SEPA SEPA PaymentIntent while it's in processing state, but it only works if Stripe has not yet submitted the debit to the bank. Once it's been submitted, the cancellation attempt will fail. An invoice.payment_succeeded event can and will fire even if you tried to cancel/void. If the debit has already been submitted to the bank, Stripe cannot stop the bank-side transaction

#

I think the general approach should be:

  • PaymentIntent is requires_payment_method / requires_confirmation: You can cancel via the API, payment won't happen
  • PaymentIntent is processing: Try cancel immediately and void the invoice, but if the debit is already submited, you need to wait for the result, then refund
sullen bay
#

Thanks for this. Can I clarify two points please.

When you say cancel via API what endpoint specifically do you mean? Payment Intent?

How would we know if the debit is already submitted? Would the PI cancellation fail?

haughty wing
#

Yes, the Payment Intent API. And yes, it should return an error if the PaymentIntent is in a non-cancellable state

sullen bay
#

Ah great.

#

So on cancelling the subscription, we retrieve the latest open invoice and the linked payment intent then proceed as you've recommended. Does this make sense?

#

As well as voiding the invoice like you said.

haughty wing
#

Yes

placid pondBOT
sullen bay
#

Though I noticed that the finding the payment intent linked to an invoice is not straightforward in itself

#

Welcome synthrider.

fleet elm
sullen bay
#

One of our accounts is on 2024-04-10 and the other is on 2019-08-14

#

Does this mean we can still access the paymnent intent directly on the invoice?

fleet elm
#

Yes, prior to 2025-03-31.basil you can use invoice.payment_intent and payment_intent.invoice

sullen bay
#

The latest invoice can be retrieved via the retrived via the latest_invoice property?

fleet elm
#

Yes on the Subscription, that has not changed

sullen bay
#

Great. That's all good then. Thanks for your help tarzan, dougal and synthrider. Much appreciated all thankyou