#om_code
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/1376867293971353660
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
As per the error, Affirm doesn't support s_f_u so we validate against those params. What does your p_m_t list look like?
["card", "affirm", "acss_debit", "us_bank_account"]
You'd need to set s_f_u at the PM-level for the ones that do support it (like here)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
can you give me some example
I just did?
payment_method_options: {
card: {
setup_future_usage: 'on_session'
}
}
like I am doinghere for access debit
if params[:payment_method_types].include?('acss_debit')
params[:payment_method_options] = {
acss_debit: {
mandate_options: {
payment_schedule: 'combined',
interval_description: gateway.gateway_configuration["ca_pad_interval"] || 'N/A',
transaction_type: 'personal'
}
}
}
end
do you mean this?
Yes
You can add s_f_u for each PM to the existing payment_method_options hash
Card supports it, as does ACH Debit and ACSS Debit
okay so we dont want to add it in
params = {
customer: @stripe_customer.id,
amount: amount,
currency: currency,
payment_method_types: payment_method_types|| [],
# setup_future_usage: "on_session"
}
right?
Yes, remove the top-level param
I removed top level param and passed it like
params[:payment_method_options] = {
card:
{
setup_future_usage: 'on_session'
}
}
but this didnt work
What does 'didn't work' mean?
however if I passed s_f_u in top level params I am able to hide the checkbox
but problem is it is not allowing me to pass affirm
Can you share the ID of the request or the Payment Intent
can you tell me which Id
req_xxx or pi_xxx
for the one which is working(without affirm) ??
This one
pi_3RTL06IwAx2JTcjp18Twdcd3
Where's the intent/request with s_f_u in the p_m_o hash like I advised?
You set it at the top-level
You said it 'didn't work'?
you mean create payment intent one right?
yes
Great!
can you tell me one last thing for what payment method types setup_future_usage is supported
like for affirmits not
?
okay thank you so much !!
hi! I'm taking over this thread. let me know if you have other questions.