#morey-testcard

1 messages ยท Page 1 of 1 (latest)

main crown
thin jungle
#

this is the req id when using that card
req_LIP0iS3kzWPxMZ

main crown
#

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

thin jungle
#

oohhhh

main crown
#

That's why it is called Payment "Intent" ๐Ÿ˜„

thin jungle
#

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?

main crown
#

yes

thin jungle
#

Gotcha

main crown
#

normally, if you don't separate authorization and capture

#

but that's different topic

thin jungle
#

hmm is it normal to do intent and then confirm right after?

main crown
#

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

thin jungle
#

ah ok, i guess my usecase is abit different

#

I see,

In my use case,

  1. Customer have added the card before calling.
  2. Customer has a service consultation, rates change dramatically (kinda like fueling up gas).
  3. 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.

main crown
#

Yeah it's totally possible if you want

thin jungle
#

Alright, my first time using stripe, just as long the flow ok by stripe standards ๐Ÿ˜„

main crown
#

You would want to check this out

thin jungle
#

Gotcha thank you, will read it over

thin jungle
#

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

sweet frost
#

@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

thin jungle
#

Alright, I will read that.