#pavlos_91429
1 messages · Page 1 of 1 (latest)
When the subscription doesn't require payment initially it will create a SetupIntent that has a client secret that you can use. https://docs.stripe.com/api/subscriptions/object#subscription_object-pending_setup_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Aha, and I can use that client secret instead of a payment intent client secret to close the Apple Pay sheet?
Interesting, I'll try that
Not sure, what part of that page I should be looking at for the differences
Currently we set it up like this:
let merchantIdentifier = "xyz"
let paymentRequest = StripeAPI.paymentRequest(withMerchantIdentifier: merchantIdentifier, country: "GB", currency: currencyCode)
paymentRequest.paymentSummaryItems = [PKPaymentSummaryItem(label: "Company Name", amount: amount)]
let applePayContext = STPApplePayContext(paymentRequest: paymentRequest, delegate: self)
Ah, I thought you were setting up the Stripe PaymentSheet, which has separate parameters for payment intent vs setup intent client secrets
self.paymentSheet = PaymentSheet(setupIntentClientSecret: setupIntentClientSecret, configuration: configuration)