#feed - PHP example code
1 messages ยท Page 1 of 1 (latest)
Hello, what issue are you running in to with our code?
Can you send the code here? Can you also send any error messages that you are seeing?
The {{PRICE_ID}} in our sample code is a placeholder. You will need to create a price via either the API or Dashboard and use its ID (pr_123....) in that call
I can't quite understand your guide unfortunately and I apologize for the questions.
How do I create prices for the products that are bought on my ecommerce?
a small examples, I have these 2 products
Here is our guide on making prices, have you seen this one yet? https://stripe.com/docs/products-prices/getting-started#create-products-prices
Basically you will want to create a Product for each thing that you sell and then you create a Price or multiple prices on that Product
but do I have to create these products on the Stripe dashboard?
You can create them via the Dashboard or our API
ok, maybe I understand.
With API, do I create the product on Stripe which I then recall for payment?
You can if you want https://stripe.com/docs/api/products/create
Or you can use the Dashboard for products as well
- I create the product on Stripe
- I recover the price and make the payment.
- I recover the result of the payment and sign paid the order.
Right?
I could,
- create the product
- make the payment
- delete the product?
If you want to yes. You can keep these products and prices to use for multiple payments unless you are only selling one of each thing
installing it on an ecommerce that can have 150K of products even doing dropshipping I don't know if it can be useful to keep them on top.
It is better to create them, make the payment and then cancel them.
Gotcha, makes sense
Also if you are planning on making a drop shipping site, make sure to write in to our support team first https://support.stripe.com/?contact=true
Dropshipping is a restricted business model for us and we require that you get prior written approval from Stripe to use Stripe on your site https://stripe.com/legal/restricted-businesses#restricted-businesses
in what way?
Do I have to ask for an authorization to have your payment method on the ecommerce site?
I actually don't know what the process looks like, if you bring this up to our support team they should be able to help you move forward
thanks for the assistance. I try to do some tests with the steps you provided me.
thank you ๐
question, I have created a product but how can I give it a custom "ID"?
๐ stepping in here as Pompey had to step away
You can pass in the id field when creating a product
https://stripe.com/docs/api/products/create#create_product-id
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yup
can you share the request ID?
oh that's a price object that you're looking at
how do i get the product created if i don't know the price ID?
this
Not sure what you mean by
how do i get the product created if i don't know the price ID?
can you try and rephrase your question?
apologizes.
How can I retrieve the id of a created product?
i found best solution
for me it means: P
ah great, glad you were able to unblock yourself ๐
thanks for the assistance ๐
I think I'll ask you other questions soon hahahhah sorry: P
NP ๐ happy to help
question: P
I made the payment.
He sends me to the success.html page.
I don't have cs_test_a1tPRu, how can I recover it?
If I put a custom variable on client_reference_id can I retrieve it?
๐ stepping in as hanzo needed to step away.
So you want to modify your success URL: https://stripe.com/docs/payments/checkout/custom-success-page#modify-success-url
This will provide the Session ID in the success URL