#phazejeff
1 messages · Page 1 of 1 (latest)
Hi there, how can I help?
im trying to get cashapp payment to work in python,
paymentIntent = stripe.PaymentIntent.create(
amount=500,
currency="usd",
payment_method_types=["cashapp"]
)
confirm = stripe.PaymentIntent.confirm(
intent = paymentIntent.get("id"),
payment_method = "cashapp"
)
but the confirm is throwing an error saying cashapp is an invalid payment option
i also tried using ```python
payment_method: { "type" : "cashapp" }
i just answered my own question!
OK, the payment_method that you specified in the confirmation call isn't a valid PaymentMethod ID
i had to create a PaymentMethod object :D
Or you can just confirm it from frontend, Stripe.js will automatically create a PaymentMethod and attach it to the PaymentIntent
im not using a normal web frontend, im doing payments through discord via a discord bot
user requests payment, bot sends them a cashapp qr code to pay
https://stripe.com/docs/api/payment_intents/object#payment_intent_object-next_action-cashapp_handle_redirect_or_display_qr_code-qr_code you can get the QR code info from the PaymentIntent object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
just found it, thanks for the help jack :D
hi @hybrid raft , sorry for the ping, but ive noticed that the code it gives expires after only around 20 seconds. any idea how to make that longer?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Or you can send this hosted instructions url to your customer, it supports QR code refresh
no way to just make the qr code last longer than 10 seconds?
I don't see any option to set a longer expiration, let me see if there's a way to refresh the QR code
ok, thank you jack. if theres just a way i can grab the new qr code without needing to create a new payment that would be great
If you retrieve the PaymentIntent again, you'll get a new QR code.