#Dooing

1 messages · Page 1 of 1 (latest)

lyric echoBOT
fresh coyote
#

Do you want this one time payment to be added to their next subscription payment or is this a completely separate thing?

frozen scarab
#

completley separate

#

like, you are subscriped to the PRO plan of lets say Stripe, andnow you want to buy a cover design of some artist

fresh coyote
#

Except you wouldn't be passing off_session=True if the user is actively on their browser and just approved the purchase

frozen scarab
#

So how would the flow be - backend sending a payment intent to the client, or the client starting the payment and the backend sends afterwards the intend to the client?

#

--
Further - can these one time products be setup on the stripe dashboard and be referenced by an ID... or is it just an arbitrary amount that is charged?

#

How would the invoice be created by stripe in the later case (without knowing the name of the product)

fresh coyote
#

Yeah that flow would work. It sounds like you want to create a one-off Invoice on your server (creating a payment intent wouldn't create an invoice)

#

Then you can pass that invoice's client secret to the client

#

And you can call confirmPayment client side using either a payment element or with the pm_123... ID of the payment intent that you already have saved to the user

frozen scarab
#

No, ideally, the invoice is created by stripe and send to the customer directly by stripe

#

as we do for subscriptions

#

I Would like to avoid implementing that on our end

#

.setConfirm(true) - what's that for?

#

and how to set the name of the product?

#

and.. again.. is it just ab arbitrary amount... or can I set up one time payments in stripe and reference them?

fresh coyote
#

In that doc setConfirm(true) is indicating that that payment intent will try to charge the user's card as soon as it is created

#

is it just ab arbitrary amount... or can I set up one time payments in stripe and reference them?
Can you explain what you mean here a bit more? You can set up these invoices with arbitrary or pre-set amounts if that is what you are asking

frozen scarab
#

price_1LhDYdF2iEUqWxhTH7KrNWlA

#

I just created it as a one time paymeny in stripe.

#

so it seems that is possible

#

so now I would just have to reference this

#

Ah in that case, you can just create an invoice and set collection_method to send_invoice,

#

where exactly?

fresh coyote
frozen scarab
#

price_1LhDYdF2iEUqWxhTH7KrNWlA
I just created it as a one time paymeny in stripe.
so it seems that is possible
so now I would just have to reference this

#

--
Would be great if you could answer it all.

#

I dont know how to buy a one time product with the price id

#

                PaymentIntentCreateParams.builder()
                    .setCurrency("eur")
                    .setAmount(1099)
                    .setPaymentMethod("{{PAYMENT_METHOD_ID}}")
                    .setCustomer(stripeCustomerId)
#

this just lets me charge an arbitrary amount

fresh coyote
#

Yes, the payment intents API does not support the prices API at the moment. So for that API call, the only option is arbitrary amounts. You can of course base that amount on the amount of a price that you have created

frozen scarab
#

? So why do I configure one time prices if I cannot then charge them also???

#

I assume we have a misunderstanding.

#

lets reset and try again.
So I have a one time price/product -price_1LhDYdF2iEUqWxhTH7KrNWlA

#

how can I buy this using the stripe api / java client

fresh coyote
#

Resetting sounds like a good idea. So to confirm your needs, you want to do a one off charge to this user and just send them the receipt essentially?

frozen scarab
#

yes. But using a product / price construct would be better than jsut typing an arbitrary amount because - a) that would be a bit more in control of the dashboard.. so the customer could set up prices and we would dynamically retrieve them and show them in the app... and also, this would allow for a description, name, and maybe also some extra meta data

#

otherwise, we would have to move all the logic into our database

fresh coyote
#

And the format of the email that the user gets will be the same as when they make a recurring subscription payment