#morey-testcard
1 messages ยท Page 1 of 1 (latest)
this is the req id when using that card
req_LIP0iS3kzWPxMZ
let me TAL
that's just PaymentIntent creation
After PaymentIntent creation, you will need to use client (js/sdk) to collect the card detail to actually "charge" (we call "confirm") this PaymentIntent
that's where the request will error
oohhhh
That's why it is called Payment "Intent" ๐
lmao. Ops.
I guess I thoguth the intent was payment
stripe.paymentIntents.confirm(
change.after.data().id
);
something like that should be used to actually charge?
yes
Gotcha
hmm is it normal to do intent and then confirm right after?
it's normal to create PaymentIntent on the server, pass back the secret to client, let client confirm it
so, not right after, a while after based on how your customer use your client
ah ok, i guess my usecase is abit different
I see,
In my use case,
- Customer have added the card before calling.
- Customer has a service consultation, rates change dramatically (kinda like fueling up gas).
- When the call ends, my server determine total amount to be paid and charges to the card at end of call.
I was thinking to just intent and charge right after the paid call.
Yeah it's totally possible if you want
Alright, my first time using stripe, just as long the flow ok by stripe standards ๐
You would want to check this out
Gotcha thank you, will read it over
I made this new request and asked to confirm it (on same card as above)
But the data field isn't populated
Here's the flow.
paymentIntent: req_RG8Pe5C8gtaE0o
paymentConfirm: req_BJZToyWoICKt0M
@thin jungle you have already passed in the payment_method in your payment_intent creation
{
amount: "350",
currency: "USD",
customer: "cus_KGARcXX2VI3gkh",
payment_method: "pm_1JfGXWLXSN9kljfYKyDkQMhA",
description: "Charge for Expert consulting",
off_session: "false",
confirm: "true",
confirmation_method: "automatic"
}
You don't need to confirm with the payment method again in req_BJZToyWoICKt0M
you will just need to handle the action required after req_RG8Pe5C8gtaE0o as now the PI is in reqires_action state
I would recommend you to take a look at how Intent state works https://stripe.com/docs/payments/cards/overview
Alright, I will read that.