#manu32 - CC Tokens

1 messages · Page 1 of 1 (latest)

slate siren
#

HI 👋

alpine haven
#

Hi

slate siren
#

My first read of this scenario is that you need to attach the token to the customer before you can use both together

alpine haven
#

@slate siren Thank you so much for your reply

#

I'm new to stripe

#

Can you please guide me

slate siren
#

I'm looking for the right doc

alpine haven
#

How I can attach

#

on frontend side I'm using pk_test_*******

slate siren
#

Okay first, using tokens is very outdated. If you want to collect payment info to be saved to a customer we recommend using a Setup Intent. If you want to charge the user AND save payment method details you can use a Payment Intent

alpine haven
#

but using payment intent it is complex to use

#

like I'm working on car sharing app

slate siren
#

Tell me what is complex about Payment Intents to you?

alpine haven
#

Yes Sure

slate siren
#

They are more safe and secure so I want to make sure you feel you can use them effectively

alpine haven
#

my be because I'm new and my understanding is less

#

any way I'm explaining

#

I'm working on car sharing app and on submit reservation I need to deduct payment

for that If I go with token way I

#

I will collect reservation ID with token and do some process on the backend side

#

this is what i'm trying to do

#

in Payment Intent way

#

I need to create payment intent and return to front-end

#

and I'm unable to figure out how front-end and back-end will communicate

#

Give me some time

#

I need to write it properly

slate siren
#

Okay so let's start off with the basics. Do you have a back-end or server that is hosting the app you wish to build?

alpine haven
#

while creating payment intent, we need some reservation data to associate with. how will we create this association? because before submit the reservation, our current reservation object is stored in reservationCache, not in Reservations collection

#

okm

slate siren
#

Yeah let's zoom out and make sure we have the basics covered

alpine haven
#

sure

slate siren
#
  1. Do you have a back-end server and if so, what programming language are you using?
alpine haven
#

JavaScript

slate siren
#

As in Node.JS?

alpine haven
#

Yes

slate siren
#

Okay, off to a great start. So have you already integrated the Stripe library for node?

alpine haven
#

Yes

#

I already did with payment intent

#

but due to I'm unable to figure out how the properly design the flow

slate siren
#

Okay and your front-end can make requests to your back-end and receive responses, yes?

alpine haven
#

yes

#

my issue is reservation have some timeout time

#

like reservation could be invalid at some point of time

#

and if user may the payment in that time

#

you can think like a race condition

#

while deleting the reservation, at the same time, user can be in the process of payment for

slate siren
#

And your integration would need to handle that race condition. Like looking up the expiration time and blocking the user from completing payment.

alpine haven
#

interesting

#

I'm checking

#

Thank you so much @slate siren for the support

#

I need to check this and apply on my use case

#

Can I open same thread of chat again If i need your help

slate siren
#

Okay great. Feel free to ask any other questions you may have about using Payment Intents to capture card details and process charges.

alpine haven
#

Can I ask you for the help on same thread?

#

or I need to create new thread ?

slate siren
#

You can ask that this one be un-archived if you come back and it is archived.

alpine haven
#

I have one more question

#

but is this mean

#

no additional charges means? no extra additional charges? or all previous charges will be deleted also

#

it is written on documentation

slate siren
#

What is the context here? Could you direct me to a specific part of the docs?

alpine haven
#

sure

#

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

slate siren
#

Right. A payment intent can be already have made a charge by this point. What this means is that any charges not already processed will not go through.

alpine haven
#

Thank you so much

#

have a nice weekend

slate siren
#

You too 🙂