#blinkdaffer

1 messages · Page 1 of 1 (latest)

vast mangoBOT
wild depot
#

Hello! Just to confirm, BE = back end, correct?

spare flare
#

yeah

#

hello

wild depot
#

You can use it directly with a Payment Intent if you don't intend to reuse the token.

#

If you intend to reuse it you should use a Setup Intent to attach it to a Customer.

#

Or use a Payment Intent with setup_future_usage.

spare flare
#

what do you mean reuse it

wild depot
#

Tokens are one-time use only. You can use them a single time for a single payment, or you can use them a single time to create a reusable payment method attached to a Customer.

spare flare
#

can you create a token from Frontend using publshable key ?

wild depot
#

Yes.

#

There are multiple ways to do that.

#

Can you tell me more about what you're trying to build?

spare flare
#

ok so here is the scenario, i have a FE which sends me token for CC and apple pay

#

i need the customer to make a 1 time purchase

#

so we are using payment intent create

vast mangoBOT
zinc skiff
spare flare
#

yeah but how do i create a checkout session with just the token

#

shouldnt i have to create a payment method first

#

attach it to the customer

zinc skiff
#

you're going way too fast

spare flare
#

sorry

zinc skiff
#

Checkout is a full hosted payment page. You don't create any token at all if you use Checkout. You let us do everything. Is that your goal?

spare flare
#

we are not using the hosted checkout page.

#

we are using elements but with custom components to get a token from the FE

#

then passing that to the BE to accept payment

zinc skiff
#

and then you go through the step and it teaches you everything you need to accept a payment securely on your own payment page

spare flare
#

out integration seems different

#

however say

#

if i only receive a token from the FE and i want to charge a customer a 1 time payment. how would i go about doing it.
should i use checkout or payment intent

#

from our BE

zinc skiff
#

Ignore Checkout entirely, it's not what you want. So you should use PaymentIntent. But really you shouldn't just get a "Random token from your front-end". Tokens are years old and mostly deprecated too

spare flare
#

ohh