#phazejeff

1 messages · Page 1 of 1 (latest)

bitter scrollBOT
hybrid raft
#

Hi there, how can I help?

leaden idol
#

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!

hybrid raft
#

OK, the payment_method that you specified in the confirmation call isn't a valid PaymentMethod ID

leaden idol
#

i had to create a PaymentMethod object :D

hybrid raft
#

Or you can just confirm it from frontend, Stripe.js will automatically create a PaymentMethod and attach it to the PaymentIntent

leaden idol
#

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

hybrid raft
leaden idol
#

just found it, thanks for the help jack :D

leaden idol
#

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?

hybrid raft
#

Or you can send this hosted instructions url to your customer, it supports QR code refresh

leaden idol
#

no way to just make the qr code last longer than 10 seconds?

hybrid raft
#

I don't see any option to set a longer expiration, let me see if there's a way to refresh the QR code

leaden idol
#

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

hybrid raft
#

If you retrieve the PaymentIntent again, you'll get a new QR code.

leaden idol
#

how would i do that? just run the confirm method again?

#

nvm there is a retrieve function lol