#artucuno_unexpected

1 messages ¡ Page 1 of 1 (latest)

ripe archBOT
#

👋 Welcome to your new thread!

⏱️ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!

🔗 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/1212205092598587443

📝 Have more to share? You can add more detail below, including code, screenshots, videos, etc.

⏲️ 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. Thank you for your patience!

gaunt crystalBOT
novel island
#
stripe.checkout.Session.create(
                    success_url=f"....",
                    cancel_url=f"....",
                    payment_method_types=['card'],
                    mode='payment',
                    allow_promotion_codes=True,
                    customer=user.stripe,
                    line_items=[{
                        'price': config.lea,
                        'quantity': 1,
                    }],
                    metadata={
                        ...
                    },
                )
rigid bay
novel island
#

Hey! I mean the credit balance for customers

rigid bay
#

that can't be used as a payment method for Checkout unfortunately

#

it can only be used to offset payments for Invoices

novel island
#

Ahh oki

#

What would be the best way to implement reducing price based on customer balance?

rigid bay
#

you can consider using Invoices instead with the Payment Element, but the integration effort would be a lot higher since you need to build your own payment page essentially

novel island
#

Oh damn, that's kind of annoying. I'll take a look at it, thanks for your help!

#

@rigid bay Sorry, I just noticed something in the API Docs.

What is the account_balance payment method for? I tried adding it and got an error.

#

customer_balance* sorry

rigid bay
#

customer balance (cash) is essentially for bank transfers