#jmak-pricingtable-customization

1 messages · Page 1 of 1 (latest)

urban bisonBOT
patent flare
#

Are you looking for a no-code option? Or an API custom integration option?

brave oriole
#

Either is fine. I imagine API gets me more flexibility since I will need to update something in my backend but no code is welcome too

patent flare
brave oriole
#

after they select a plan how do i modify my backend? I assume its something i track via events?

patent flare
brave oriole
#

okay. Lets say I want to do the code version because I don't actually want them to be subscriptions per month. I want it to instead be different payment plans they can purchase for tokens to be used on my site

#

can the no code version support that?

#

for example $5 for 500 credits, $10 for $1100, etc

patent flare
#

Yeah, that's supported. You would just need to create the amount on the fly based off of user input. Obviously the token tracking would need to happen on your end, but I don't see any reason that wouldn't work

#

Or just create a Price with an amount of $1 and then update the quantity on it

brave oriole
#

is there a way to highlight which one is like

#

Best Seller

#

type of thing

normal cairn
#

Yes, our pricing tables have functionality to highlight a certain product

brave oriole
#

wow nice!

#

is there any other branding I can add to this?

#

or multiple ways to highlight different products

#

for example i want some to be best deal

#

and some to be most popular

normal cairn
#

I don't know if there is a way to highlight multiple but can check

#

For branding are you talking about customizing colors and such?

brave oriole
#

yeah like can i add a logo or something

#

also i notice that the code is live, is there a way to test via test mode?

#

specifically because there are a lot of different payment events on my site and i need to properly track

normal cairn
#

As long as you have "test mode" toggled on in your dashboard the pricing table will be created in test mode

brave oriole
#

ohh

#

i see

#

it doesnt carry over

#

got it ok

#

i just want a little more brandin on the page cos it seems bland

normal cairn
#

So it looks like the image and description are the ones from the product

#

Not seeing a way to specify multiple highlighted prices though. I can put in a feature request for that

brave oriole
#

got it okay

#

so i cant add like a custom background or anything

#

its just like that white color

latent quartz
#

I think so

#

jmak-pricingtable-customization

#

you can configure the color in the Dashboard, but not add a custom background

brave oriole
#

okay got it

#

and after i set each price point, is there a way to differentiate in the events

#

which one was purchased

#

i see a unique price ID for this listing

#

i assume thats just also a unique object id

#

also, is there a way to prefill some of the info of th pricing table if i have that info

#

also redirect and whatnot

#

it looks like there is no way to show a confirmation and then also redirect

#

it looks like though it the checkout.session.completed event, i'm not sure where I can see what was purchased

latent quartz
#

by default we don't tell you what's in the Checkout Session

#

but you can ask the API explicitly for the line items and get that information

brave oriole
#

how do i do that using the no code version?

latent quartz
#

not sure what you mean. There's no no-code version to do anything like this. Or you manually look in the Dashboard

brave oriole
#

oh, your colleagues recommended that I make the payment table using the no code version

#

how do i include the properties i want inside the pricing table?

latent quartz
#

I'm sorry I have no idea what you are asking

#

the PricingTable is a nocode version that lets you render a UI offering multiple pricing option. That works. You were explicitly asking about something completely separate for reconciliation after someone pays

brave oriole
#

The pricing table is created, but I currently am getting checkout session completed events after paying. I want to know which product they brought from the pricing table

how do i do that

#

otherwise i can't properly communicate to my BE on updating the user records

latent quartz
#

That's what I explained to you. You have a back-end, it's not "no code". Like you, in your own backend/webhook handler, write code to get that information

brave oriole
#

yes i understand that

#

so i am asking you how to include proper checkout information for the products in the pricing table

#

you haven't answered that question

latent quartz
#

but I don't understand that question

brave oriole
#

?

#

im simply asking how to transmit product info for products inside my pricing table

latent quartz
#

the PricingTable is a client-side no code integration. You configure the Dashboard with a list of Prices, you get the UI client-side, it sends your customer to Checkout. There's alreayd "including products in your pricing table"

brave oriole
#

but it doesn't include product ID

#

otherwise how do you even know what the customer has purchased

latent quartz
#

lol

#

I'm sorry we're talking a bit past each other right now

#

Can you confirm that you are solely trying to figure who bought what in your webhook handler on your back end code?

brave oriole
#

yes

#

once i know who bought what i can trigger the proper logic

latent quartz
#

perfect, so that's what I was explaining. Let's agree that this is completely unrelated to the PricingTable itself which is the client-side UI to offer pricing options. It is solely about after the payment which is handled by Checkout.
Your code/webhook handler gets a checkout.session.completed Event to indicate someone paid on Checkout. That Event contains information about the Session itself like the Customer id if any, the amount, etc.
It does not include the line items information by default. This information exists and you can request it but you have to make an explicit API request, that's what is documented in the link I gave you earlier: https://stripe.com/docs/expand#includable-properties

If you make that explicitly call you can see the line item(s) on that Session, the Price details and the underlying Product id if needed

brave oriole
#

so by default the pricingTable products already have that information, I just need to expand it in the webhook handler

latent quartz
#

correct

brave oriole
#

okay that makes sense to me thank you

#

then my next question is regarding microtransactions

#

assume one of the payment options is a $1 microtransaction, should the pricing table then just have a $0/mo plan but then a line item with $1?

#

because i don't see that as an option in the pricing table

latent quartz
#

I don't really understand your ask sorry

brave oriole
#

I am trying to make a microtransaction item for purchase

#

according the stripe documentation you recommend grouping them together via this $0/mo plan and then invoicing by line item

latent quartz
#

sure but that requires you writing all of this entirely yourself. The PricingTable doesn't support anything like this. It's an easy no-code solution to offer various pricing options and take a payment upfront or start a subscription

brave oriole
#

so if i had a $1 option on the pricingtable, there is no way to instead batch it ?

latent quartz
#

I don't get what batch it means. I'm sorry, I'm not trying to be difficult but this is super vague. Batch what, in which context? Like the customer comes and pays on the PricingTable 7 times that day and you want to batch all $1 payments as one big $7 payment? Something else? I would need you to be a lot more explicit about what you are trying to achieve here

brave oriole
#

they both in essence batch txns together

latent quartz
#

I mean there's no two options in my sentence. Please take a minute to write full sentences explaining what you are really trying to achieve.

But the concrete example I gave is definitely impossible with PricingTable which would literally just take a $1 payment 7 times separately

brave oriole
#

i dont get how this is misunderstood -- if you read the documentation that was instructed it literally tells you how they are bundled

#

but yes you would batch the txns for customer on some time period, say at EOD or EOW

#

but you have answered my question saying the pricing table would not support this

Would the other option be then to engineer my own pricing table modal and include 3 individual checkout sessions

latent quartz
#

the documentation which you just took a picture of (so not sure which one it is, we have hundreds of docs) is not for the PricingTable though.

Would the other option be then to engineer my own pricing table modal and include 3 individual checkout sessions
I don't think so. Like if you want to "batch" transactions, you need a lot more than this. You need to collect payment method details upfront, you need to track transactions over a certain period, you need a cron job that will charge the customer for that amount, handle declines, etc.
there are many ways to build this and it depends a lot on what you are really after

brave oriole
#

okay but how do i actually do the part where it says subscribe them to a $0/mo plan and then add in line items

latent quartz
#

So you can use the PricingTable for the $0/day or week recurring Price. But the rest you have to build yourself. Like in your app whenever someone goes and donates say $0.50 or something, you would create an InvoiceItem for that amount (what the doc indicated) and then each day/week (depends on your choice) we will cut a new Invoice for the Customer and charge them "all the InvoiceItems" together

#

so I visit your app, when I want to pay you send me to Checkout to create a $0/week subscription. Then you add an InvoiceItem for $1 today
On Thursday I come and donate $1.5 so you add a new one.
On Sunday I come and donate $2.75 and you add a new one.
Next Wednesday, the new weekly billing cycle starts, so we create an Invoice for the $0/week Price, and we pull in the pending InvoiceItems so we charge you $0 + $1 + $1.5 + $2.75 = $5.25 for that week

brave oriole
#

yeah okay so this part

"so I visit your app, when I want to pay you send me to Checkout to create a $0/week subscription. Then you add an InvoiceItem for $1 today"

is not possible via pricingTable right?

I don't see a configurable option where It can be a $0/mo charge and then $1 line item

latent quartz
#

correct, you do the $0/month part and after, with code, when you get checkout.session.completed you add the InvoiceItem for $1

brave oriole
#

okay i get it.

#

One last question -- I've indexed into LineItems.Data[0].ID to get the ID but it doesn't seem to be product ID, its like an id that starts with li_

#

maybe thats just the line item ID, but how do i get the actual product ID?

#

the client reference ID is also null from the PricingTable

latent quartz
#

all the properties are documented right there

brave oriole
#

yes i am looking at this right now

#

but i don't see the proper field for the product ID

latent quartz
#

Sure because there's a Price ID which is what you are selling. And a Price is associated with a parent Product itself. So you need to expand the Price to get to the Price details and see the parent Product id

brave oriole
#

okay so i should use the price_ id instead of the prod_ id right

#

because i see two associated ID's here

latent quartz
#

I mean you can get the Product ID too with what I explained above

#

it's important to understand that many of our API resources are "connected" to each other, a bit like foreign keys on a database

brave oriole
#

oh i see it

latent quartz
#

A Checkout Session points to LineItems, those point each to a Price, which each points to a Product, etc.

brave oriole
latent quartz
brave oriole
#

got it so the price IDs are unique and linked right

#

like if there are two $4 items, the price Ids are still unique

latent quartz
#

and yes

brave oriole
#

also i had more of an operational question here

#

if tax is not immediately collected, is the alternative to have my accountant do these tax calculations for my business?

latent quartz
#

I would assume so, sorry I can't really speak to that, you should talk to your accountant who likely will tell you you have to collect tax as part of the original payment, or make it inclusive or something

brave oriole
#

okay no worries thank you for all the help i think i have enough to proceed