#cho_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1254835361583206462
đ Have more to share? Add details, code, screenshots, videos, etc. below.
my specific question is:
I see this code:
expressCheckoutElement.on("click", (e) => {
const options = {
applePay: {
recurringPaymentRequest: {
paymentDescription: "Standard Subscription",
regularBilling: {
amount: 1000,
label: "Standard Package",
recurringPaymentStartDate: new Date("2023-03-31"),
recurringPaymentEndDate: new Date("2024-03-31"),
recurringPaymentIntervalUnit: "year",
recurringPaymentIntervalCount: 1,
},
billingAgreement: "billing agreement",
managementURL: "https://stripe.com",
},
},
};
e.resolve(options);
});
And I was wondering how this worked in conjunction with setup intents and charging the customer
There may be times where we swap the price or delay the cadence based on the customer's needs and how they wish to use the product
You should be find to save the Apple Pay PM and charge it via a Subscription like a normal payment method. Apple has other restrictions around using saved cards (like no on session payments) that we outline in this doc https://docs.stripe.com/apple-pay/apple-pay-recurring#how-recurring-apple-pay-payments-work
Awesome
Am I able to do this with the express checkout element and the onConfirm prop here or will I need a different element?
correct me if I'm wrong, after reading the article and the end paragraph, I will do it in this way:
- Create an empty setup intent and load customer into it.
- Have the onConfirm's function reference the token that is created from the customer interacting with the express checkout element
- Use said token to create a payment method with the setup future usage off session
- finish setup intent
Yep those steps look good to me. One quick thing: is this subscription starting immediately? Or is this a setup for a subscription that won't start until later?
until later.
Awesome, if it started immediately I was going to suggest confirming the subscription's first payment intent up front but that is not relevant here