#tjon_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/1265708304697528441
๐ 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.
- tjon_confirmationtoken-setup, 6 days ago, 76 messages
Hello
Have you tried setting the same payment_method_types on PaymentIntent creation request as you're setting it on your client-side code?
I believe so
I'll double check but I think that was one of the first things I tried I also tried removing them all to see if that would work
On my end I see you're setting
"card",
"us_bank_account",
]
on client-side
when you initialise the element.. You'd want to set the same values when you create the PaymentIntent server-side
server side
var options = new PaymentIntentCreateOptions
{
Amount = longValue,
Customer = donor.Id,
Currency = "usd",
ConfirmationToken = saleData.CreditCardCryptogram,
Confirm = true,
AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions
{
Enabled = true,
AllowRedirects = "never"
},
PaymentMethodOptions = new PaymentIntentPaymentMethodOptionsOptions
{
Card = new PaymentIntentPaymentMethodOptionsCardOptions
{
SetupFutureUsage = "off_session"
},
UsBankAccount = new PaymentIntentPaymentMethodOptionsUsBankAccountOptions
{
SetupFutureUsage = "off_session"
}
},
Metadata = new Dictionary<string, string>
{
{ "Form_Name", "test_form" },
}
};
CLient side
const options = {
mode: 'payment',
amount: 100,
paymentMethodCreation: 'manual',
currency: 'usd',
paymentMethodTypes: ['card', 'us_bank_account'],
//confirm = true,
setupFutureUsage: 'off_session',
payment_method_options: {
card: {
setup_future_usage: 'off_session'
},
us_bank_account: {
setup_future_usage: 'off_session'
}
},
automatic_payment_methods: {
enabled: true,
allow_redirects: 'never'
},
};
I have tried variations of removing / changing the automatic payment method and the payment method options
In your server side code you have
AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions
{
Enabled = true,
AllowRedirects = "never"
},
Can you remove that?
ok running it now
You either need paymentMethodTypes or automatic_payment_methods, you don't need to set both
If you don't pass any of the above parameters then we default to automatic_payment_methods
yeah I'm pretty sure I had that turned off but turned it back on in the case of testing everything i could
yeah same error
confirm token :req_XPbrVIn27exU18
PI : req_1lAQPRTpyzYO6Y
Yes because you still have paymentMethodTypes on client-side..
Let me ask you a clarifying question, is there a reason you're setting that parameter in your code? Are you trying to manually specify the payment method types for a specific reason?
Yes we are trying to go live asap and we are a connect account so we need to limit what our customers will be using to what we have setup.
as we expand our coverage we will allow more options but to begin with we just need to match our current offerings of card and ach