#sapient_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ 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.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ 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/1387744217786355774
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
You can look up the payment method details via the resulting Payment Intent and Charge that Checkout generates: https://docs.stripe.com/api/charges/object#charge_object-payment_method_details
In my project, I am charging Stripe processing fee from the customer but when a customer makes a payment through acss_debit then this fee is less due to which first in my project I will ask the customer how he wants to pay. If a customer selects acss_debit then for example $12 will be charged from them but if a customer selects acss_debit and makes the payment through card then it is said to be wrong. If during the payment I find out how the payment is being made then I can stop it. If possible then let me know.
Sorry, not sure I understand. Where does the customer select their payment method?
hi! I'm taking over this thread.
When the customer makes a payment, I ask them how they will pay, then the stripe provides something like I send them acss_debit and if they pay by card, the payment does not succeed.
const session = await stripe.checkout.sessions.create({
mode: "payment",
line_items: stripe_product_price_ids,
payment_method_types: ["acss_debit", "card"],
payment_method_options: {
acss_debit: {
mandate_options: {
payment_schedule: "interval",
interval_description: "On ",
transaction_type: "personal",
},
verification_method: "automatic",
},
})}
Where do you ask hwo the customer will pay? On the Checkout Session page itself, or before you redirect the user to the Checkout Session.
Yes, it will be just a string value, which I want to pass to Stripe's stripe.checkout.session function. If Stripe has such a functionality to pass in stripe.checkout.session, then Stripe will know whether the payment is made by card or by acss_debit. If the string value is acss_debit and the customer pays by card, then the payment should fail. If this is possible, please tell me.
Sure, in your code you wrote this: payment_method_types: ["acss_debit", "card"],. So update this line to online include acss_debit or card, depending on what the user choose earlier in the flow.
please explain me in details