#Giriraj
1 messages · Page 1 of 1 (latest)
i m passing full amount from below code
const paymentIntent = await stripe.paymentIntents.capture(paymentIntentId, {
amount_to_capture: amount,
})
suppose i have capture 10$. i m passing 10$ to update capture method.
Do you see your request on Dashboard log? https://dashboard.stripe.com/test/logs
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
yes
How does it look? can you share the request id? req_xxx
req_v0rOXbegyc5a7x
i m capturing using below code
const paymentIntent = await stripe.paymentIntents.create(
{
amount: amount,
currency: "usd",
customer: customerId,
payment_method: paymentMethodId,
capture_method: 'manual',
off_session: true,
confirm: true,
receipt_email: receipt_email
}
);
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
This PI is captured successfully
yes correct, but why not updating status here?
i think i have provided wrong req_xxx id
That's different PI
yes
let me share that PI request id
i can't find req_xxx id let me share evt_xxx id
evt_3NNbleBSgwhLUexT003vI0pr
req_6S7DNkamd412zJ is the id
pi_3NNbleBSgwhLUexT0UWaHSWb
It wasn't captured yet
https://dashboard.stripe.com/test/logs/req_6S7DNkamd412zJ you only created the amount and confirm, but haven't captured it
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
oh, so where i m wrong?
m capturing using below code
const paymentIntent = await stripe.paymentIntents.create({...
This doesn't capture
This is only to create and confirm the PI. You need a separate call to capture the PI, like stripe.paymentIntents.capture
you mean just i need to do like below?
const paymentIntent = await stripe.paymentIntents.capture(paymentIntentId)
Yep, please remove your image because it has your secret key
i think no need to pass amount_to_capture field. if i need to capture full amount.
ok thank you
@low forge let move to another question.
currently i m use setupintent like below
const setupIntent = await stripe.setupIntents.create({
customer: customerId,
payment_method_types: ["card"],
});
and also i m use cardelement which is provided by stripe
but i need to add one more payment method which is apple pay. so how can i do that?
yes, i know sorry
can you show me? or share any link. so i can see how it's look's
You just create a SetupIntent and use PaymentElement to show it on a Safari, within a Mac/iPhone has Apple Pay proper setup
Something like this
With a "Pay" button downside
ok thanks. but should i need to pass payment_method_types : ["card", "apple pay"]?
no, just card
What doesn't work? Do you open on Safari, with ApplePay setup?
yes i have try but it's unable to works.
Do you use it in PaymentElement? Have you verified the domain?
yes, i have just now verified my domain. look above screenshot i have open in safari.
i can't see apple pay option
i have used paymentelement see my code
Have you followed the domain verification step here? https://stripe.com/docs/stripe-js/elements/payment-request-button?client=html#verifying-your-domain-with-apple-pay
yes, same thing i followed. but it's not works for me
click on any slots and click on claim one session button
then next page will open then click on add new card button
I see ApplePay
I think it's because of your location, when ApplePay isn't supported in India.
oh, it will support in maxico, united state?
Apple Pay offers an easy, secure, and private way to pay on iPhone, iPad, Apple Watch, and Mac.
Yes should! ApplePay is just the payment method, shouldn't affect the capture step