#seth_go-upgrade
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/1300978455940431933
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
seth_go-upgrade
@limber minnow I'm going to need a bit more details than this, such as an exact API request id req_123 with the exact error you get and where the error comes from (client or server-side)
Also can you explain which stripe-go version you upgraded from and whether you carefully reviewed the breaking changes between each one?
I migrated from v70.15.0 to v80.2.0. I did review all of the breaking changes, especially around creating a new payment intent.
This is happening when I first create a payment intent with the provided params:
params := &stripe.PaymentIntentParams{
Amount: stripe.Int64(amount),
Currency: stripe.String(string(stripe.CurrencyUSD)),
PaymentMethod: stripe.String(paymentMethodId),
ReceiptEmail: stripe.String(receiptEmail),
Customer: stripe.String(stripeCustomerID),
ConfirmationMethod: stripe.String(string(stripe.PaymentIntentConfirmationMethodManual)),
TransferGroup: stripe.String(rideId),
}
and then later go to confirm that payment after the user action is completed I get this error:
"status":400,"message":"A return_url must be specified because this Payment Intent is configured to automatically accept the payment methods enabled in the Dashboard, some of which may require a full page redirect to succeed. If you do not want to accept redirect-based payment methods, set automatic_payment_methods[enabled] to true and automatic_payment_methods[allow_redirects] to never when creating Setup Intents and Payment Intents."
Ah gotcha you did a huge jump like 10 major versions is a huge deal. You also jumped like 3 or 4 years of API versions with tons of breaking changes.
They have all been resolved based on the changelog.
and then later go to confirm that payment after the user action is completed I get this error:
do you have the code and the request id for that error?
I have the payment_intent id, is that helpful?
They have all been resolved based on the changelog.
you likely fixed build errors but didn't look at API breaking changes where the behaviour of the API changed which is why you are hitting this one
Just kidding, I have the request ID too...didn't realize I logged it: "request_id":"req_fGqvIhphlpwtG3"
Okay so you are confirming server-side with go. That PaymentIntent was created in https://dashboard.stripe.com/test/logs/req_AbZu44yQzJTZFT
That API request never disabled automatic payment methods. You mentioned you did in your original question but really that's what you are missing here
Yup, so to resolve the issue before reaching out I attempted to disable automatic payment methods. However, when I add that to my payment intent creating I get this error
You want to carefully read this entry https://docs.stripe.com/upgrades#2023-08-16 and the associated documentation page https://docs.stripe.com/upgrades/manage-payment-methods to understand the overall feature
Since you are using manual confirmation (which is an integration path highly discouraged) you are likely only accepting card payments right?
"status":400,"message":"You may only specify one of these parameters: automatic_payment_methods, confirmation_method.
Yup, card payments only
cool so the easiest change for you is to pass payment_method_types: ['card'] on PaymentIntent creation specifically to only force card support and get the old behaviour