#MetalMonk

1 messages · Page 1 of 1 (latest)

unborn stumpBOT
ivory edge
sonic jasper
#

Yes, separate auth and capture.

ivory edge
#

Hm ok. When you said: If they choose wire, we create a payment intent with a preauth, and create their booking. Later we release the hold if they send the wire, otherwise we capture it. Are you saying you capture a card payment here if you don't receive a wire? Just trying to understand exactly what's happening

sonic jasper
#

Yes, that's what we currently do in production. That way if they fail to send the wire transfer to us, they are still charged for their booking.

#

They have 6 days to complete the wire transfer. When we receive the wire transfer, we cancel the payment intent. If we haven't received the wire transfer after 6 days, we capture the payment intent.

ivory edge
#

So are you accepting wire payments outside of stripe?

sonic jasper
#

Yes

ivory edge
#

Got it ok I think I understand now

#

One sec

sonic jasper
#

All our card payments go through stripe, but wires are outside of stripe. We give the customer a 3% discount if they pay by wire outside of stripe, basically we pass on the savings since it avoids fees.

ivory edge
#

What do you need the invoice for exactly?

#

Is this some legal requirement

sonic jasper
#

It is not a legal requirement. We just want to use them internally for several reasons. We make one invoice and one charge for several services, then if they would like a refund for one of the services on the invoice, we can check the invoice to see exactly what they paid for each service, and refund the correct amount. We are also hoping to set up some financial reporting in stripe that uses the invoices to see how much revenue we got from different categories of services.

#

We figured why reinvent the wheel and create our own invoice system when we could use Stripe invoices.

ivory edge
#

Yeah fair enough. So since invoices don't have separate auth and capture there isn't a good solution here really

#

Your workaround is fine

#

But overall, it seems our invoices aren't compatible with this specific usecase

#

But if you're willing to accept the workaround/tradeoff that's fine

sonic jasper
#

I had one other idea. So there's a payment intent created upon finalizing the invoice. If I immediately call await stripe.paymentIntents.update(finalizedInvoice.payment_intent, { capture_method: 'manual' }) would that do the trick for placing the hold on the customer's card? Or would that update fail?

ivory edge
#

No that wouldn't work

#

Would be a bit of a race condition

unborn stumpBOT
sonic jasper
#

Oh, because the finalization would have already either charged the customer, or sent the customer an invoice email, depending which action I chose. And I just tried doing:
const finalizedInvoice = await stripe.invoices.finalizeInvoice(
invoiceId,
{ auto_advance: false },
);
but that results in a null finalizedInvoice.payment_intent. EDIT: actually the finalizedInvoice.payment_intent existed, but I got the error "Error: Some of the parameters you provided (capture_method) cannot be used when modifying a PaymentIntent that was created by an invoice. You can try again without those parameters."

ivory edge
#

yeah it just wouldn't work