#Monkey D. Luffy
1 messages · Page 1 of 1 (latest)
Hi
Can you share more details please ?
Yeah sure
stripe.terminal.Reader.process_payment_intent(device_id, payment_intent=pm_id)
I am using above method to process payment intent from stripe terminal and I am getting the above mentioned error
I am following this documentation
https://stripe.com/docs/terminal/payments/collect-payment?terminal-sdk-platform=server-driven&reader=simulated#process-payment
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
I didn't get any error It's 500
It's saying it didn't has this method
process_payment_intent
If you are getting this error from Stripe API, there must be a requestid
Let me send you full code
def pos_process_payment_intent(self, device_id, pm_id):
try:
stripe.api_key = settings.STRIPE_SECRETE_KEY
resp = stripe.terminal.Reader.process_payment_intent(device_id, payment_intent=pm_id)
return resp
except stripe.error.StripeError as e:
raise ValidationError(str(e).split(":")[1].strip())
Its saying terminal.Reader doesn't have process_payment_intent Method
Can you share your accountId ?
Where can I find account id?
This is not enough, we need to have a requestId
Are you seeing any error request:
https://dashboard.stripe.com/test/logs?success=false&showIP=false
AccountID:
I am not seeing error request
Yes
What about this
type object 'Reader' has no attribute 'process_payment_intent'
Can you share a screenshot of the error
its not stripe API can you see the method I am using in that SS
Yes is the value of pm_id?
device_id: tmr_FCyeVAhlnw5xuu
pm_id: pi_3N8ic9LmCssJZxZe1hUjHvQb
From documentation
stripe.terminal.Reader.process_payment_intent("tmr_xxx", payment_intent="pi_xxx")
Yes, but the error message not clear from where you are getting it.
Can you please share again your accountiD ?
acct_1ICRDKLmCssJZxZe
What Stripe Python SDK version you are using ?
stripe==2.56.0
Can you try download this sample and run it locally?
https://stripe.com/docs/terminal/quickstart?integration-country=US&platform=server-driven
it uses the method stripe.terminal.Reader.process_payment_intent
Yeah sure
try using a more recent version of Stripe python SDK e.g. 5.4.0
The method process_payment_intent was introduced in version 2.70.0:
https://github.com/stripe/stripe-python/blob/master/CHANGELOG.md#2700---2022-03-30
You need to upgrade Stripe SDK
Okay Sure