#soi-collins_api
1 messages · Page 1 of 1 (latest)
👋 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/1398291006553591929
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
I don't understand the scenario here and what you're using. You said "Payment Links" but are you referring to the invoice-specific Hosted Invoice Page for payment?
we added a late fee (€15) and canceled the original intent. Stripe auto-applied the €100 to the new €215 invoice
Are you voiding/crediting the invoice and creating a new one with an added late fee?
It would be helpful to share some specific example invoice ID(s) to illustrate this
It sounds like an invoice <> bank transfer reconciliation flow but its not clear to me whats happening vs what you expect to happen.
Here is our ptoblem
Basically we are only dealing with checkout session and partial payments for bank transfers(direct debit = no)
When a customer needs to pay via bank transfer, they access a page with a unique link. If the link is valid, we generate a Stripe Payment Link for the current total_to_pay and direct the customer to Stripe. We store the resulting payment_intent.id in the invoice_customer record.
Are you using thehosted_invoice_urlfor this? Or something else?
https://docs.stripe.com/api/invoices/object#invoice_object-hosted_invoice_url
You said "generate a Stripe Payment Link" again but it doesnt sounds like you're using Payment Links at all.
https://docs.stripe.com/api/payment-link/create
Again, an example invoice/customer ID would be helpful here.
No, I am using checkout session: https://api.stripe.com/v1/checkout/sessions
In Bubble, we compute the paid amount as:
amount_paid = full_amount - remaining_from_stripe - amount_paid_so_far
→ 300 - 200 - 0 = 100 (Correct)Before the customer pays the remaining €200,
this part doesnt add up to me. full amount (300) - remaining (200) - paid so far (100) is 0.
Now I really don't understand how invoices come into play if you're using checkout sessions
Now I really don't understand how invoices come into play if you're using checkout sessions
Please provide an example set of objects to look at:
customer ID
invoice ID(s)
checkout session ID
I'd like to understand whats happening here before i offer any guidance
Invoice is aterm we use on our app to refer to a payment that we need from a customer of that month.
To pay the invoice we use stricpe checkout session object and listen to payment_intent.partially_funded webhooks from stripe for reconciliation
Generally speaking though:
Is there any stripe endpoint or webhook we can listen to that gives us the amount that the customer just paid now when they pay a checkout session bank transfer manually?
For your use case you might want to look at manual reconciliation, which let's you handle thecash_balance.funds_availableevents to manage where to apply those funds:
https://docs.stripe.com/payments/customer-balance/reconciliation#cash-manual-reconciliation
I understand a bit more aboit whats happening
The issue is when you cancel those partially funded payments, the cash balance is restored to the customer since it was not consumed by the partial PI
(you cancelled it)
unapplied_from_payment A partially funded payment intent was modified or canceled, and the funds were returned to the customer’s cash balance. You can use these funds for future payments.
https://docs.stripe.com/payments/customer-balance#types
customer ID: cus_R5YZ3XZ2ph50XS
Checkout session: cs_test_a1bSQaIBZ9s6RUR24sX6aIp51TzGb1N40lJx2QONxHZj2tyqTkfwQsBfhF
Payment intent: pi_3RoQHxRxHwQsfMvb0eNH6WPg
Charge: py_3RoQHxRxHwQsfMvb0nyaQRb5
Thanks -- looking
The issue is when you cancel those partially funded payments, the cash balance is restored to the customer since it was not consumed by the partial PI
Yes this is the issue I am facing
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
this is the partial payment returned to the customer balance when you canceled the payment intent: https://dashboard.stripe.com/test/logs/req_QHiYunXwh3rOPI
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
@unkempt narwhal please use the flow in #help to have your own thread created
how as i dont see the option to start new thread
Can I filter the https://docs.stripe.com/payments/customer-balance/reconciliation#cash-manual-reconciliation by the reference ID I sent from my app?
What do you mean?
Sorry, never mind. I just read through that documentation and it seems to be a whole new topic because I will now have to stop the automatic reconciliation so that I can control it.
I am just wondering is there a webhook that I can listen to instead of payment_intent.partially_funded that can tell me that stripe successfully charged the customer this amount just now?
I think this is an important distinction though, the customer has sent funds, but they're still only pending application to that payment this its partially funded
If that payment is cancelled, the funds are returned to their balance to be used for another payment
You never finished the original payment and havent collected the funds from their balance
You seem to have a different expectation about how that works
So i want to make sure thats clear that this is normal and expected for a cancelled payment
If you create a new invoice/payment for that customer, its expected for those cash balance funds to apply there
since they were not yet used for anything else
Your mental model seems to be that the cancelled payment was completed/collected, but thats not how it works
Your mental model seems to be that the cancelled payment was completed/collected, but thats not how it works
For sure that was my thinking. so for the solution I can rely on the Manual cash balance reconciliation and this mean that I dont need to cancel the payments intents any more when fees are added instead I should create a new payment intent with the fees just for the purpose of reconciliation with my app
You might not need manual, but it depends on what you want to happen
Because you can create the new payment like you're doing, except create it for 315 instead of 215, and the 100 will be re-applied
and the customer needs to send the outstanding 215 to complete the payment
or, you could cancel the payment, create a new payment for 100 first to consume the received funds, then another payment intent for 215 to colelct the remainder
it depends on the customer relationship and business flow, whether you should collect those partial funds or leave them pending until everything is received etc
Because you can create the new payment like you're doing, except create it for 315 instead of 215, and the 100 will be re-applied
and the customer needs to send the outstanding 215 to complete the payment
I think this might be the way to go but there is one catch. everytime I will need to track the partial amounts that have been reconciled from stripe to be able to do (215 + 100 =315).
I will discuss it internally and to see the feasible solutions. Thank you for your help for now @errant sequoia , I will reach out incase we face any tech challenge with the implementation