#nibbs

1 messages · Page 1 of 1 (latest)

lunar pecanBOT
flat crypt
#

hi there! I can try to help, what's up exactly?

eternal oak
#

Hi.. trying to set up stripe terminal for a POS that I'm making for a client. Since I can';t use server integration, I'm using your docs as a guide. Currently, I'm running it with a useEffect hook, but not sure if that is the correct path forward.

flat crypt
eternal oak
#

Since everything is currently run off useEffect, I was worried that the physical terminal would be bypassed since I have terminal.collectPaymentMethod and terminalprocessPayment in the same hook.

flat crypt
#

I'm not sure I follow your concern or how things would be bypassed exactly. Have you already written an integration that seems to work well with the simulated reader?

eternal oak
#

Running everything seems fine, but, in my payment intent after terminal.processPayment, captured amount reads 0.

flat crypt
#

hmm I mean that's normal. Did you capture the PaymentIntent?

eternal oak
#

Yes. Here is a screenshot of the code

flat crypt
eternal oak
#

I have manual capture in my api

flat crypt
#

not sure I follow. Nothing in that code is related to capturing a PaymentIntent. It's just connecting to the reader and authorising a charge. It's backend code that creates the PaymentIntent or is involved in capturing it that would be relevant here.

#

also, please share an example PaymentIntent pi_xxx ID where you're seeing this "captured amount reads 0" and I can have a look!

eternal oak
#

paymentIntent
:
allowed_source_types
:
['card_present']
amount
:
100000
amount_capturable
:
100000
amount_details
:
{tip: {…}}
amount_received
:
0
application
:
null
application_fee_amount
:
null
automatic_payment_methods
:
null
canceled_at
:
null
cancellation_reason
:
null
capture_method
:
"manual"
charges
:
data
:
Array(1)
0
:
amount
:
100000
amount_captured
:
0
amount_refunded
:
0
application
:
null
application_fee
:
null
application_fee_amount
:
null
authorization_code
:
"123456"
balance_transaction
:
null
billing_details
:
{address: {…}, email: null, name: null, phone: null}
calculated_statement_descriptor
:
"Stripe"
captured
:
false
created
:
1665668224
currency
:
"eur"
customer
:
null
description
:
null
destination
:
null
dispute
:
null
disputed
:
false
failure_balance_transaction
:
null
failure_code
:
null
failure_message
:
null
fraud_details
:
{}
id
:
"ch_3LsRarJmNUvmJ4ew1ca8HqeV"
invoice
:
null
livemode
:
false
metadata
:
{}
object
:
"charge"
on_behalf_of
:
null
order
:
null
outcome
:
{network_status: 'approved_by_network', reason: null, risk_level: 'not_assessed', seller_message: 'Payment complete.', type: 'authorized'}
paid
:
true
payment_intent
:
"pi_3LsRarJmNUvmJ4ew1VkBy0w8"
payment_method
:
"pm_1LsRauJmNUvmJ4ewyQpCsSeT"

flat crypt
#

that is what is logged from your console.log(finalizedPayment) line?

eternal oak
#

sorry. just copied a console.log

#

yes

flat crypt
#

then that's normal then

eternal oak
#

super.

flat crypt
#

you haven't captured the PaymentIntent yet

eternal oak
#

I have it set to manual on the backend

flat crypt
#

makes sense, then until you actually do the manual capture, the amount_captured will be 0 naturally.

#

let me know if something is unclear!

eternal oak
#

Thanks. haven't worked much with stripe so I'm being a bit paranoid.

#

I reallly appreciate your help.

flat crypt
#

happy to help