#arielbo
1 messages · Page 1 of 1 (latest)
Hello
Hi there 👋
I'm not sure what you're asking, can you be more specific?
Let me explain a bit, I am creating a payment page to sell courses but the client would not have an account (cus) previously created in stripe, is it possible to build the paymentintent without the client having a cus?
Im using php stripe for my flow
You can use Checkout to do that: https://stripe.com/docs/checkout/quickstart
Otherwise, you need to create a Customer for all other products, as far as I can tell
and in Custom payment flow ? is possible ?
You can create a custom flow to accomplish making payments via Payment Intents, but you would have to create Customer objects for all your Customers
// Create a PaymentIntent with amount and currency
$paymentIntent = \Stripe\PaymentIntent::create([
'amount' => calculateOrderAmount($jsonObj->items),
'currency' => 'usd',
'automatic_payment_methods' => [
'enabled' => true,
],
]);
I would have to create the client in stripe, but after the payment has been made, correct?
I'm not sure. The term "client" here is ambiguous, so can you be more specific?
Hi there, stepping in as two-shoes has to step away. Let me catch up here
in your example Custom payment flow , in which moment you can create the customer in stripe
Im analice this https://stripe.com/docs/payments/quickstart example of Custom payment flow , I see that you are get the email of the customer, but in your code I can't see the need to previously create the customer, in this case it's not necessary, right?
You do not need to create a customer to create a Payment Intent. They only required parameters are amount and currency: https://stripe.com/docs/api/payment_intents/create when creating a Payment Intent. When you create the customer is up to you. The example provided on the guide is just a guide, you can customize this and create the customer: https://stripe.com/docs/api/customers/create where it fits.
of course, now we are in the same thought
well, in this case the payment_intents not require product created right?
Can you clarify what you mean with 'require product created right'? If you're referring to https://stripe.com/docs/api/products, then no.. You can just pass the amount and currency.
its the same like a customer object I understand that to create one Payment intent Im need only amount and currency
please another ask could you help me in delete one product?
prod_N2hjnu0uhMAk8U I cant delete this
I dont have any order with this product but I cant delete
Can you share the request id where you attempted deleting it, https://stripe.com/docs/api/products/delete. Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
that's the right option, archive the product if you don't plan to use it
because we discourage deletion and so you need to archive and that's all. No need to do anything else
I understand but it's really annoying to have archived products if they've never been used, I understand that we can archive them if they have associated sales but if they don't, I don't see it as practical, actually when I created a product it duplicated itself
Well, then I'm going to leave it in archived and thank you for your help, another question, is it possible to calculate the tax in paymentintents, possibly?
No, there's no tax calculation support on PaymentIntent today. You'd have to use Checkout or Invoicing instead
but is in planning right ? to september 2023 in replace of orders
it might, but for now no such thing exists
In checkout I need to pre created always the product and prices ids ? or maybe can I to use like a paymentintents with price arbitrary without a product predefined
For tax calculation to work, we need to know exactly what is being sold, otherwise you can't calculate tax. That's why it requires Products and Prices yes
now I understand so good
awesome!
in my case all my clients when created his courses can put the own prices and maybe I need to created this price inline by api stripe, but exist some limit to create multiple prices in one product ?
there's no such limit, so yes you can create those in line as needed
maybe is the best option checkout to my case, in checkout I have automatic tax calculation and the customer will be created automattly right?
all products have checkout code right ?
I don't understand what those sentences could mean. But yes using Checkout is likely the best option
When I use Prebuilt Checkout page, is enabled by default tax calculation?
https://stripe.com/docs/payments/checkout/taxes it's all documented end to end!
After the payment in the Prebuilt Checkout page, will the customer be automatically created in stripe?
https://stripe.com/docs/payments/checkout/guest-customers also fully documented
please take some time to read our docs first. We're happy to help when you're blocked
thank you I will be reading
awesome!
can I duplicate the same price and amount? in some case
if every client can create his price id, is possible that exist duplicates amounts
it doesn't really matter, that's up to you if you want duplicate Prices or not, it just works