#feed - PHP example code

1 messages ยท Page 1 of 1 (latest)

remote crest
#

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?

small wharf
#

yes, one second

remote crest
#

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

small wharf
#

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

remote crest
#

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

small wharf
#

but do I have to create these products on the Stripe dashboard?

remote crest
#

You can create them via the Dashboard or our API

small wharf
#

ok, maybe I understand.
With API, do I create the product on Stripe which I then recall for payment?

remote crest
#

Or you can use the Dashboard for products as well

small wharf
#
  1. I create the product on Stripe
  2. I recover the price and make the payment.
  3. I recover the result of the payment and sign paid the order.

Right?

#

I could,

  1. create the product
  2. make the payment
  3. delete the product?
remote crest
#

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

small wharf
#

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.

remote crest
#

Gotcha, makes sense

small wharf
#

in what way?
Do I have to ask for an authorization to have your payment method on the ecommerce site?

remote crest
#

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

small wharf
#

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"?

bold copper
small wharf
#

correct?

bold copper
#

yup

small wharf
#

ok, but

#

what am I wrong? ๐Ÿ˜ฆ

bold copper
#

can you share the request ID?

small wharf
#

request ID?

#

req_GYbemFwHJ3Rvnz

#

?

bold copper
#

oh that's a price object that you're looking at

small wharf
#

how do i get the product created if i don't know the price ID?

small wharf
bold copper
#

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?

small wharf
#

apologizes.
How can I retrieve the id of a created product?

#

i found best solution

#

for me it means: P

bold copper
#

ah great, glad you were able to unblock yourself ๐Ÿ™‚

small wharf
#

thanks for the assistance ๐Ÿ™‚

I think I'll ask you other questions soon hahahhah sorry: P

bold copper
#

NP ๐Ÿ™‚ happy to help

small wharf
#

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?

primal copper
#

๐Ÿ‘‹ stepping in as hanzo needed to step away.

#

This will provide the Session ID in the success URL