#guz
1 messages · Page 1 of 1 (latest)
Hello! The answer to #1 depends on your integration. It sounds like you're using Stripe Checkout; are you creating Checkout Sessions with code? If so, are you setting payment_method_types? https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_method_types
yes i am creating checkout session with code
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.
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
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.
I saw that for basc payment I have to listen for some events
and i am only listening for chekcout session completed
What is "basc payment"?
sorry its bacs i think
Oh, Bacs Direct Debit?
yes
Yeah, if you want to accept those payments you need to listen for some other Events, as that's an async payment method which involves significant delays: https://stripe.com/docs/payments/bacs-debit/accept-a-payment?platform=checkout#async
Yeah but I don't want to accept those payment, does that mean I do not need to change anything?
You need to turn Bacs off in your Dashboard and confirm Bacs does not show up as an option in Checkout.
Thank very much!You were very helpful!