#guz

1 messages · Page 1 of 1 (latest)

cloud baneBOT
dusky herald
spice forge
dusky herald
#

For #2, if you're only accepting card payments, the only Event you need to listen for regarding payment is checkout.session.completed. You're welcome to listen to other Events if you want to, though.

spice forge
#

try:

        checkout_session = stripe.checkout.Session.create(
            line_items=[
                {
                    # Provide the exact Price ID (for example, pr_1234) of the product you want to sell
                    "price": price_id,
                    "quantity": total_days,
                },
            ],
            mode="payment",
            success_url=url_for("thanks", _external=True),
            cancel_url=url_for("cars", _external=True),
        )

    except Exception as e:
        return str(e)
#

this the code

dusky herald
#

I don't understand question #3, can you provide more details/rephrase?

#

Okay, so in that code you are not using payment_method_types, which means the payment method options are controlled in your Dashboard, so the answer to question #1 is yes, you can control the payment method options available in Checkout from your Dashboard.

spice forge
#

I saw that for basc payment I have to listen for some events

#

and i am only listening for chekcout session completed

dusky herald
#

What is "basc payment"?

spice forge
#

sorry its bacs i think

dusky herald
#

Oh, Bacs Direct Debit?

spice forge
#

yes

dusky herald
spice forge
#

Yeah but I don't want to accept those payment, does that mean I do not need to change anything?

dusky herald
#

You need to turn Bacs off in your Dashboard and confirm Bacs does not show up as an option in Checkout.

spice forge
#

Thank very much!You were very helpful!