#donut_docs

1 messages ยท Page 1 of 1 (latest)

ocean dragonBOT
#

๐Ÿ‘‹ 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/1422930283790991441

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

lucid fulcrum
#

๐Ÿ‘‹ Hi there. Let me take a look!

merry mesa
#

Thanku

lucid fulcrum
#

So you're looking to create a new Stripe Subscription, and get the user to pay straight away?

merry mesa
#

i am trying to create a recurring subscription and then save the payment method so that stripe handles thepayments

wispy harbor
#

Hi there, taking over for @lucid fulcrum as they had to step away

#

Can you share the relevant request ID? Also if there's a specific guide that you've used so far, it would be helpful to share that as well

merry mesa
#

i cant really find a guide on integrating apple pay on server side i am just trying to use what i already did for paypal and card payments

wispy harbor
#

Got it, can you share the request ID?

merry mesa
#

what request id

#

from the confirm payment?

wispy harbor
#

Yes, the request that resulted in the error

wispy harbor
#

Got it, looking into the details now. Just for future reference, you can find the request ID in the dashboard developer logs (but the payment intent ID you shared will work here)
https://support.stripe.com/questions/finding-the-id-for-an-api-request

merry mesa
#

thank you. i am new to stripe

wispy harbor
#

Can you share the frontend code where you confirmed the payment intent?

merry mesa
#

yes

#

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);

#

const appearance = {
theme: 'stripe',
variables: {
borderRadius: '36px'
}
};
const expressCheckoutOptions = {
buttonHeight: 50,
buttonTheme: {
applePay: 'white-outline'
}
};
this.expressCheckoutElements = stripe.elements({
mode: 'payment',
amount: amount || 0,
currency,
appearance
});

this.paymentElement = this.expressCheckoutElements.create(
  'expressCheckout',
  expressCheckoutOptions
);
this.paymentElement.mount('#express-checkout-button');
wispy harbor
#

Can you try sending setup_future_usage: 'off_session' in this confirm payment?

merry mesa
#

yes but its gonna take me a while since i can only test it in dev env not locally

#

for apple pay

wispy harbor
#

Basically the issue isn't related to DPANs or MPANs, it's about a mismatch in the setup_future_usage parameter. Creating the setup intent and confirming the payment intent has to be consistent