#amfpaulo_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/1358884828417626122
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- amfpaulo_invoices-payment-intent-terminal, 2 hours ago, 76 messages
- amfpaulo_api, 3 days ago, 12 messages
- amfpaulo_docs, 3 days ago, 28 messages
Hello
Based on the PaymentIntent object, the amount capturable is 350 and you're trying to capture 373 hence the error
Ok, I understand that, the amount capturable is 350 because do not include taxex, the invoicing system will calculate taxes, and its doing correctly, the invoice amount actuyally is 373 after taxes
How can I solve this ?
with out having to calculate taxes
Are you using a third-party invoicing solution? If so, you'd need to add the invoice item separately to the invoice before it finalizes
please look the code I sent yu
Im undertand req_id is importand but so the code
this is what I am doing:
paymentIntent = await paymentIntentService.CaptureAsync(request.IntentId,
new PaymentIntentCaptureOptions { AmountToCapture = invoice.AmountDue });
yes exacly on the amout of the invoice
but the PaymentIntent you've created is not associated with any Stripe invoices
There is a reason for that
M2 terminal do not accept card_present
I cant pay invoice using M2 terminal (card_present) but I can capture the money, manually mark invoice as paid:
invoice = await invoiceService.PayAsync(invoice.Id, new InvoicePayOptions { PaidOutOfBand = true });
I thought the PaymentIntent would update it self at the moment I try to collect, If not, what is best solution for this ?
Still there ?
Yeah please be patient, trying to understand your flow..
Ok no problem, I am just trying to help
M2 is a lost product
I am already used to Stripe ignoring it. I t made me lose so much time, with not intentional, but wrong answers from support team... I believe not many people uses M2
I am bacaming a M2 specialist ... lol
So If I'm understanding your flow correctly so far:
1/ You are creating a PaymentIntent for in-person payment with $x amount
2/ You also create an invoice in parallel
3/ You're using a third-party to calculate taxes
I'm unclear on following
- How are you updating the PaymentIntent amount with the taxes after you get the calculated tax back?
- You're saying
I thought the PaymentIntent would update it self at the moment I try to collect, If not, what is best solution for this ?
Why would you expect the PaymentIntent to update itself? What docs are you following for this?
Stripe is calculating Taxes automatically on the invoice
There is no docs for M2, I am based on my experience with the API
I am not updating the Payment Intent for the reason I told you.
I have a way to simplify this, highest tax in the us. is 11.2 I thing is city in Washington , If I include 11.2 on the intent and collect less is this allowed and what happens with the extra that I planed to collect but did not do it ?
I am not updating the Payment Intent for the reason I told you.
Sorry if I missed it but I don't see a reason above which explains why you're not updating the PaymentIntent.
The ideal flow would be
1/ You create a PaymentIntent for in-person payment with $x amount
2/ You create an invoice in parallel
3/ Once you finalize the invoice, Stripe will calculate taxes
4/ You update the PaymentIntent amount to include the tax amount - You can use the API to update the PaymentIntent https://docs.stripe.com/api/payment_intents/update#update_payment_intent-amount
5/ Once the PaymentIntent has been updated - you can collect the customer's payment method and confirm the PaymentIntent + Capture it
- I said I am not updating because I thought in the moment you create a intent is like reserving the money from the client, but when you collection if collecting more this would just self update the intent.
What happens in the scenario I told you, create intent for example 11 dollars, but collecting just 10.6 dollars
the Collect process has the option to AmountToCollect, Its has to have some use for that
I said I am not updating because I thought in the moment you create a intent is like reserving the money from the client, but when you collection if collecting more this would just self update the intent.
That's not how it works unfortunately.
What happens in the scenario I told you, create intent for example 11 dollars, but collecting just 10.6 dollars
You can do that as long as your customer knows that the authorized amount is not the actual amount. Otherwise you will see high number of disputes which would put your account at Risk
The higher number its just on hold right ?
not collected, the real number that goes out from his account is the AmountToCollect ? Am I correct ?
Hold amount is what the customers would see initially on their bank app/statements until the charge is successfully processed
got it
but I'll never take more then what I specify on AmountToCapture, right ?
Its not goint to be like, take 11 dollar, refung 0.40 cents
Correct. We'll only capture the amount you specify when making the Capture API request.
cool, thank you.