#akdj16

1 messages · Page 1 of 1 (latest)

still patioBOT
lost pendant
#

👋 happy to help

#

in that case there wouldn't be a latest_invoice.payment_intent but instead you need to look at the latest_invoice.pending_setup_intent which you would use with the Payment Elements to collect the Payment Method for the subscription

amber gorge
#

but I am trying to create a payment method with applePay, and I used createPlatformPayPaymentMethod on the mobile app, and the confirmPayment requires a paymentIntent client secret

lost pendant
#

in that case you would use the confirmSetup with the client_secret of the SetupIntent

amber gorge
#

ok! let me try

lost pendant
#

I would suggest the following

#

in your backend code
1- expand on ["latest_invoice.payment_intent", "latest_invoice.pending_setup_intent"]
2- change your code to send the type (payment or setup) with the client_secret as the response

#

in your front-end code you would choose whether to use confirmPayment or confirmSetup based on the type that you receive

amber gorge
#

ok! I am doing it

lost pendant
#

let me know if you need any more help

amber gorge
#

Hi, I succeed to attach the payment method with the subscription setupIntent but the pm is not indicated as a apple pay payment method, only CB

#

I am trying to identify it with paymentMethod.card.wallet.type

#

oh sorry, it works finally