#donut_code

1 messages · Page 1 of 1 (latest)

fair coyoteBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1423620002443034645

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

warm remnant
#

mode subscription


#

mode: payment

onyx perch
#

What does the compelte purchase button do with the Express Checkout Integration ?

#

Can you share the id of the Checkout Session you are using for the Subscription mode?

warm remnant
#

ignore that button for the moment since we are not using it

stripe
.confirmPayment({
elements: this.expressCheckoutElements,
clientSecret,
confirmParams: {
return_url: returnUrl
}
})
.then((walletPayment) => {
if (walletPayment.error) {
return reject(new Error(walletPayment.error.message || 'Wallet payment failed'));
}
resolve(walletPayment);
})
.catch(reject);

this is the function we use to confirm the apple pay purchase, we do not use checkout sessions

onyx perch
#
        clientSecret,

You are using the clientSecret of a PaymentIntent then, can you share its Id ?

warm remnant
#

i am using the client secret of a confirmation secret,

pi_3SE6bpRvd0kOjiXV0nYrD5wv_secret_mATqhocXdyhFG0EgtWhhNMZ6b

onyx perch
#

stripe
.confirmPayment({
elements: this.expressCheckoutElements,
clientSecret,
confirmParams: {
return_url: returnUrl
}
})
.then((walletPayment) => {
if (walletPayment.error) {
return reject(new Error(walletPayment.error.message || 'Wallet payment failed'));
}
resolve(walletPayment);
})
.catch(reject);
I'm confused, but what guide are you following exactly ?

#

this.expressCheckoutElements = stripe.elements({
mode: 'payment',
amount: amount || 0,
currency,
appearance
});

Here you should use the mode: 'subscription' and not 'payment'

warm remnant
#

is this necessary ? getting a merchant token from Apple Pay

onyx perch
warm remnant
#

what might be the issue that when i use subscription mode the buttons are not shoiwng

#

we did try to use mode subscription already

onyx perch
#

Thanks for confirming.

#

And when you used the mode subscription, any error message in the console/network ?

warm remnant
#

let us check quick

#

no errors appear

onyx perch
#

But it's not recommended AFAIK.

warm remnant
#

okay

#

let us try

#

we do not have a customer billing portal

#

for apple pay

#

elements.create('expressCheckout', {
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",
},
},
});

where can i find the mamagement url

#

?

onyx perch
#

where can i find the mamagement url
It should be your frontend (the page/portal that allows your customer to manage their Subscription )

warm remnant
#

okay

#

i need like 5-10 minutes since i cant test it locally only on development

onyx perch
#

Yes sure, take your time!

warm remnant
#

seems like it is working now

#

thank you

#

this is supposed to work with paypal too right ?

#

on paypal i am calling this function

#

const result = await stripe.confirmPayPalSetup(this.expressCheckoutClientSecret, {
return_url: returnUrl,
mandate_data: {
customer_acceptance: {
type: 'online',
online: { infer_from_client: true }
}
}
});

onyx perch
#

Yes

onyx perch
#

Happy to help!

warm remnant
#

Thank youuu