#pavlos_91429

1 messages · Page 1 of 1 (latest)

hoary helmBOT
heady dune
brave moth
#

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

heady dune
#

You can but you may need to instantiate the sheet slightly differently

brave moth
#

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)
heady dune
#

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)

hoary helmBOT
brave moth
#

We use Setup Intent indeed to setup cards but not for the Apple Pay case

#

For Apple Pay we use the implementation as mentioned in the docs

#

And we need the client secret to pass here: STPIntentClientSecretCompletionBlock

heady dune
#

Yep, so the setup intent's client secret should work there

#

You can expand the pending_setup_intent property when making the call to create the subscription and the client secret will be returned with that