#ssbjsb_api

1 messages ¡ Page 1 of 1 (latest)

stiff relicBOT
#

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

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

stuck frost
#

Endpoint used:

https://api.stripe.com/v1/payment_intents/#{invoice.payment_intent}/apply_customer_balance"

hard moon
#

Please share the request id

stuck frost
#

I am trying to apply a customer cash balance to past due invoices when Stripe does not automatically reconcile the invoice with Bank Transfers.

Writing a test for it and getting this error.

"The PaymentMethod provided (card, cashapp, link, wechat_pay) is not allowed for this endpoint. Customer balance can only be applied to PaymentIntents that have customer_balance PaymentMethods attached."

#

My bad
Request ID: req_lQnFeVlXTuGsMR

hard moon
#

Bank transfer is not an available payment method on that invoice

#

That's why you're getting that error

stuck frost
#

Do invoices need to be created with the specific bank transfer payment method to be able to use that endpoint?

#

What is the best way to programmatically reconcile a past due invoice with bank transfers without having to create a copy invoice?

hard moon
#

You can't if it wasn't created with bank transfers enabled to start

#

Which this one wasn't

#

So you won't be able to with this one

stuck frost
#

Bank transfer enabled for the invoice or for the customer?

hard moon
#

Bank transfers are disabled as a payment method in your invoice settings

#

You can see at this link

#

If you enable it, it will be enabled for future invoices

#

But you cannot enable it for previously created invoices when it was disabled

stuck frost
#

That's fine
This is part of an integration test. So once that setting is on, the test will create a new invoice and the setting should apply to it, correct?

hard moon
#

Yeah it should

stuck frost
#

Okay sounds good.
Thank you!

hard moon
#

No problem

stuck frost
#

Will creating a VBAN for the customer turn it on for the invoice?

#

I have tested bank transfer payments on invoices successfully before in the test mode

hard moon
#

Can you share an invoice where you did this before?

#

AFAIK you need to enable it

hard moon
#

Hm not sure it's possible that your settings changed and it was enabled back then

#

Try enabling it in your test settings and it should work