#lanman9000_checkout-price-data

1 messages ยท Page 1 of 1 (latest)

teal saddleBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1465385852019413137

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

runic temple
simple shard
#

when doing so, customers can't alter the prices or pick a different price, correct?

runic temple
#

Correct, those are different Checkout features. price_data is for the person creating a Checkout Session to specify an ad hoc amount

teal saddleBOT
simple shard
#

when we sent a customer to the checkout, we want to specify the product, specify the quantity, then specify the pricing.
once that's done, we want to set that product, quantity, and price as a subscription that bills them for that same product, quantity, and price every month.

clear meteor
#

Hi ๐Ÿ‘‹

I"m stepping in as my colleague needs to go.

simple shard
#

thank you

#

during the first checkout .. we establish the product, the quantity, and the price for that product .. and that is what is set as the monthly subscription

clear meteor
#

Are you creating the Checkout Session for a one time purchase or are you creating the Subscription using the Checkout Session?

#

The way you are wording that is confusing to me

simple shard
#

sorry. during the first checkout .. when the user is setting up their products .. they will select an initial quantity of the product. our portal will then direct them to stripe for checkout.

when they go to checkout, we want to send (via API) the product, the quantity, and a custom price.
once the customer checks out, a monthly subscription is established for the product, quantity, and price.

clear meteor
#

That's how Checkout Sessions in mode: "subscription" work. As long as the price_data you define includes the necessary recurring parameter, you create a Subscription and the payment processed during the Checkout Session is for the first Invoice of that Subscription.

simple shard
#

perfect

clear meteor
#

This is much easier to understand if you code this in Test mode

#

You can write a very simple script to create a Checkout session and print the URL, then complete the checkout session using our test card so you can see the Invoice and Subscription created

simple shard
#

if the customer wishes to update the subscription by changing the quantity .. do we need to send "price_data" during subscription quantity changes?

clear meteor
#

No. Using price_data will create an actual Price object.

Also, when you need to change the quantity, you are modifying the Subscription object. We have multiple guides for handling updates to Subscriptions here

#

It's really easiest to get a handle on this if you code a simulation using a Sandbox or Test mode

simple shard
#

so when we specify price_data .. if I go to the product in the stripe dashboard .. it will show multiple prices? all of the prices that have been used with the price_Data parameter?

clear meteor
#

Yes

simple shard
#

understood. thank you very much.

clear meteor
#

Wait a sec ... let me test that

#

Okay I misspoke. We d not show these prices on the dashboard

teal saddleBOT
#

lanman9000_checkout-price-data