I am accepting payments using a Stripe URL in my app. After the payment is complete, Stripe redirects to the specified URI. This is a common process, but here’s where things get complicated. My URI is a link to a domain and since the URI of a valid domain is http/https, it doesn’t work with the ASWebAuthenticationSession callback URL scheme. You might suggest, “Just make the URI custom and use in the Stripe redirection link,” but unfortunately, that’s not possible.
When adding your custom URI to Stripe, which lacks a valid domain like http/https, Stripe throws error {“Not a valid URL”}. For ref.: Stripe Doc
So, you need to use a valid URI, but that doesn’t work with the ASWebAuthenticationSession callback URL scheme. Do you have any ideas on how to get a callback URL with ASWebAuthenticationSession? Or is there another way to get a callback URL with SFSafariViewController in Swift, if possible?
Manish Chauhan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.