Search code examples
swiftapistripe-paymentsurlsession

How to request a Stripe Payment Link with the API from Swift?


I am wondering how to create a Stripe Payment Link in my IOS (swift / swiftUI) app using the Stripe API. How does this API request work?

I suppose I can do it using URLSession, but unfortunately don't know how...


Solution

  • Stripe Payment Links can only be created via the API using your secret API key. Your secret API key needs to be kept safe, and is not something you should put in your iOS app as it would let anyone with access to your app perform almost any operation on your Stripe account.

    You should create Payment Links using the Stripe Dashboard or in code on your server instead.