#kral

1 messages · Page 1 of 1 (latest)

dawn flaxBOT
undone vapor
#

hi

#

so the "0.53 per keyword" is essentially "per credit"

hollow idol
undone vapor
#

yeah but is there a simple way to just checkout to a sub

#

and I change the price & quantity dynamically

#
  • unit price
#

I see that a competitor is doing this

#

im not sure if its tiered

hollow idol
#

tiered means that each tier has a unit price

undone vapor
#

yes i know

#

but it would take me 5 hours to come up with those tiers

#

range is 150 to 10000

hollow idol
undone vapor
#

thats not what im looking for

#

i just want to set a unit price and quantity for a sub

#

on the fly

#

is this not possible

hollow idol
#

you can use price_data

undone vapor
#

can I do this with a checkout

hollow idol
#

yes

undone vapor
#

can you give me an example bro

hollow idol
undone vapor
#

do you get paid for chatting to me

#

or is this voluntary

hollow idol
#

let me know if you need any more help

undone vapor
#

I do

#

I didn't fucking understand

willow echoBOT
#
kral#3938 has been warned

Reason: please mind your language. you can take a look at the #📖rules if you need a quick reminder of how to behave on the server

undone vapor
#

how about you give me a proper answer

#

instead of linking me back to api docs

#

this is unbelievable

stone mauve
#

If you need help here, I refer you to #1 in #📖rules

#

Let me know once you've read that and you want to continue with us helping you

undone vapor
#

I have. However you can it's ridiculous that I had to talked to a rep for 6 minutes

#

and got an irrelevant link back

stone mauve
#

What I think is ridiculous is your condescending attitude and use of profanity

#

If you're prepared to be more polite and have some patience whilst we help you and other users, then I can try and help you with your questions

undone vapor
#

yes please

stone mauve
#

Great, let's start again. Help me understand your issue? What have you tried so far?

undone vapor
#
function customPrice(input) {
      var priceMax = 0.66;
      var priceMin = 0.49;
      var slider_end = 1200;
      var slider_start = 150;

      if (input > slider_end) {
          return priceMin;
      } else if (input >= slider_start && input <= slider_end) {
          var range = slider_end - slider_start; // range of input
          var difference = input - slider_start; // difference from input to 1200
          var priceRange = priceMax - priceMin; // range of price
          var priceDifference = (difference / range) * priceRange; // calculate price difference based on input difference

          console.log(priceMax - priceDifference)
          return priceMax - priceDifference; // subtract price difference from max price to get price based on input
      }
  }
#

this is my calc

#

to set a custom price

#

so I need to use price_data for sure

#

I'm just at a loss at how this would work

stone mauve
#

Ok, great. Which part isn't working as you expect?

undone vapor
#

I still have no clue how to make the stripe work with this

#

do I make a product with a random price then use that product ID with the checkout + price_data

#

what happens when this is checked out and i get a webhook

stone mauve
#

Ok, one question at a time

stone mauve
undone vapor
#

checkout definitely

stone mauve
#

Have you written any code to create a Checkout Session yet?

undone vapor
#

what happens to price_ids in this case

#

in the backend

#

does every customer get a random price_id

#
  -- Stripe data
  "stripeCustomerId" text,
  "stripeSubscriptionId" text,
  "stripePriceId" text,
  "stripeSubscriptionStatus" text
#

I'm mostly stressed about managing these custom plans long-term

#

is there a way to test this against webhook

#

with stripe cli

stone mauve
stone mauve
#

For example, do you plan on reporting usage? In the screenshot it references 'credits'

undone vapor
#

reporting usage? no

#

simply put they adjust the slider to get their custom quote for the credits

#

they sub to this plan

#

then every month these credits are added to their acc

stone mauve
#

So the credit price is lower as the # of credits increases?

undone vapor
#

from competitor's site

undone vapor
#

and it's a basic graph algo

#

so there's like 100s of tiers in reality

#

it may be that my competitor is using tiered pricing

#

but I want more flexibility

stone mauve
undone vapor
#

because my unit price is 0.66

#

then 0.65 0.64 0.63 0.62 ...

stone mauve
undone vapor
#

all the way down to 0.4~

stone mauve
#

Well you can configure the tiers that way. Sure would take some work, but it's better than having a unique Price object per subscriber as you described

undone vapor
#
const session = await stripe.checkout.sessions.create({
      customer: stripeCustomerId,
      payment_method_types: ["card"],
      subscription_data: {
        // Add a trial period for this subscription
        //trial_period_days: 14,
        // Uncomment to add a coupon code from request body
        //coupon: body.coupon
      },
      line_items: [
        {
          price_data: {
            currency:'USD',
            product:'prod_OIVgCdVSlv8NRl',
            unit_amount:100,
            recurring:{
              interval:'month'
            }
          },
          quantity: 100
        },
      ],
      mode: "subscription",
      success_url: "http://localhost:3000/success",
      cancel_url: "http://localhost:3000/fuck",
    });
#

like would this cause me a headache later on?

#

due to unique price ids

stone mauve
#

There's definitely downsides yep as they're not re-usable

undone vapor
#

could you elaborate on the downsides

stone mauve
#

Well they're immutable for start so you couldn't update them

#

Also may skew your Billing metrics (like MRR reporting) as everyone would be subscribed to a different plan

#

Definitely something for you to consider, but either of those approaches will work for you

#

Also will simplify your front-end logic as you would defer the pricing calculation to us

undone vapor
#

can you also help me understand how I can have 2 separate accounts

#

based on the same company

stone mauve
#

You can just create a new account from your Dashboard

undone vapor
#

yeah but that asks me to add a new company

#

as well

#

do i just fill in the same information

stone mauve
#

Yeah should be fine