#alexelba-payments

1 messages · Page 1 of 1 (latest)

quaint tiger
#

hello again, what Stripe document or guide are you following?

there is always a server-side portion involved

cobalt radish
#

I was looking the demo

quaint tiger
#

which demo

#

you should follow a Stripe guide along with a demo

cobalt radish
#

originally was following this one

#

but I think you told me this docs are wrong

quaint tiger
#

docs should not be wrong and if they are they should be fixed

cobalt radish
#

lex-stripe

Yesterday at 9:42 PM
heya @cobalt radish! actually that guide seems to have gotten the code wrong and I'll let the relevant team know that we need to fix this.

To answer your question, yes, that method should be called in submit

You may want to consider looking at these samples instead on Github : https://github.com/stripe-samples/subscription-use-cases/tree/v1.0/fixed-price-subscriptions

GitHub

Create subscriptions with fixed prices or usage based billing. - subscription-use-cases/fixed-price-subscriptions at v1.0 · stripe-samples/subscription-use-cases

#

alex-stripe

Yesterday at 9:42 PM
heya @cobalt radish! actually that guide seems to have gotten the code wrong and I'll let the relevant team know that we need to fix this.

To answer your question, yes, that method should be called in submit

You may want to consider looking at these samples instead on Github : https://github.com/stripe-samples/subscription-use-cases/tree/v1.0/fixed-price-subscriptions

GitHub

Create subscriptions with fixed prices or usage based billing. - subscription-use-cases/fixed-price-subscriptions at v1.0 · stripe-samples/subscription-use-cases

quaint tiger
#

not clear which line that was on but the rest of the guide should be fine to follow

cobalt radish
#

is there any way to copy live product to test, I know I can copy test product to live

quaint tiger
#

ah no it only works test -> live

cobalt radish
#

cool thanks, for "Determine which products and pricing plans your customers can select." customer portal, it only allows me to select one price per product how would customer know they can change the prices between products

#

If I create 3 saparate products works fine but when i create prod_KZvetkPDCLF2j0 one product 3 prices

#

it does not allow me to pick all 3 prices

quaint tiger
#

for the Customer Portal creation

cobalt radish
#

I am doing in dashboard

#

not using api

quaint tiger
#

it will still be a request

#

in your Dashboard Logs

#

Dashboard uses the API too

cobalt radish
#

One sec let me check

#

the errror logs have no error

quaint tiger
#

ah I see that is where the error is, which two Prices are you trying to add to that Customer Portal?

#

like what currency and interval are they (also their Price IDs pls)

cobalt radish
#

One sec

#

USD Product: prod_KZvetkPDCLF2j0 -> price_1JulnHLkmSqBPkgT6Cnpuxqs price_1JulnHLkmSqBPkgTfrnrMA9k price_1JulnHLkmSqBPkgTLcXn7DBp

quaint tiger
#

yeah so the way the Portal works is that it supports either switching to a different Price on a different Product, or a diff Price on the same Product (but with a different interval)

basically when you have "gold" or "silver" "plans" , those should each be a different Product, and that is how you should model it in Stripe

and then each Price will be like "gold yearly" or "gold monthly" - two Prices under one Product

and same for silver

cobalt radish
#

So create 6 products Silver Monthly -> Silver Yearly .. Gold ....

#

and add all silver one into portal and set up for each upsell to yearly

#

is it correct?

quaint tiger
#

yes that is how the Customer Portal thought of Products/Prices

#

well that would be 2 Products

#

and 2 Prices under them

#

Prod_1 = Silver
Price_a = silver monthly, price_b silver_yearly

Prod_2 = Gold
price_x = gold_monthly, price_y gold_yearly

cobalt radish
#

ok great thanks

#

I successfully created one product following this but when creating the second one it doesn't allow me to set upsell

#

prod_KZwmuv8GyFOQbT

#

price_1JumsmLkmSqBPkgTs3FwWHFC -> price_1JumsmLkmSqBPkgTX5lJ8FQH

waxen lava
#

Hello! Catching up, hang on... 🙂

cobalt radish
#

thanks just doing the last part now, for setting up the dashboard and products

waxen lava
#

When you say it doesn't allow you to set upsell what are you referring to? The Customer Portal settings in the Dashboard?

cobalt radish
#

so on portal, I created the "silver" product, created price_1 and price_2 (price_1 x 12 - discount) and linked price_1 to be upsell to price_2

#

now creating gold package the same way

#

Gold -> prod_KZwmuv8GyFOQbT

#

price_1 price_1JumsmLkmSqBPkgTs3FwWHFC and price 2 price_1JumsmLkmSqBPkgTX5lJ8FQH

#

when I go to price one and go to upsell section price_1JumsmLkmSqBPkgTX5lJ8FQH is not there

#

even if I type name or put the id

#

it does not come out

#

Silver package

#

Gold ONe

#

I think I know why, looks like because tax one is inclusive other exclusive

waxen lava
#

Which are the two Price IDs that worked?

#

Ah, that could be it.

cobalt radish
#

one sec let me check if that works

#

nope did not work lol

#

it worked for prod_KZwiRiTN6rwRz9 (price_1JumocLkmSqBPkgThFz0KFY4 price_1JumocLkmSqBPkgTn02kRNyo)

waxen lava
#

Hm. If you reload the Dashboard does it show up?

cobalt radish
#

yup it did the trick opening in new incognto

#

I guess it was cached

waxen lava
#

Ah, interesting. Glad that worked!

cobalt radish
#

so with integerated dashboard

#

it allows only one subscription per user?

waxen lava
#

Integrated Dashboard? You mean the Customer Portal?

cobalt radish
#

yup

waxen lava
#

No, it supports multiple Subscriptions for a single Customer.

cobalt radish
#

One more question: stripe.createPaymentMethod takes card as parameter, but I am creating 3 parts stripeElements.create('cardNumber', {style: style});

#

how do I comibine them to pass

#

stripeElements.create('cardExpiry', {style: style,})

#

stripeElements.create('cardCvc', {style: style,})

waxen lava
#

When using the split card fields you can pass any one of them into stripe.createPaymentMethod and it will automatically find and use the others.

cobalt radish
#

stripe.createPaymentMethod({
type: 'card',
cardNumber: card.cardNumber,
cardExpiry: card.cardExpiry,
cardCvc: card.cardCvc,

#

I tried this

#

and get error that this method need card property

waxen lava
#

Yeah, you need to do something like this:

stripe.createPaymentMethod({
  type: 'card',
  card: card.cardNumber,
  // ...
});
cobalt radish
#

how about the rest of the fields

#

do I need to pass them?

waxen lava
#

Nope, just the one.

#

It can be any one.

cobalt radish
#

oh cool

#

😄

waxen lava
#

It will automatically find the others.

cobalt radish
#

thanks

cobalt radish
#

Right now on dashboard when trying to upgrade the subscription

#

for next month charge it charges both this month and next month togather

#

how do I do so it will charge only new fee instead current+new

quick bridge
#

Hi there, please allow me to step in and help.

#

I was wondering if these upgrades and downgrades are occurring at the end of the month? Anytime the customer prefer?

#

And rather the subscription is prorated?

cobalt radish
#

hi

#

so ideally what I want is follow, when users pay, they pay on 1st Nov it will cover their service for whole month of Nov

#

and if they try upgrade or downgrade it will do it after Nov is over

#

and will charge the new price

#

there should not be any case where it will charge current fee + new fee

quick bridge
#

I see, if the customer upgrade or downgrade in the middle of the month, the old subscription will last until the end of the month, and invoice for next month is the new price

cobalt radish
#

yup

#

the screenshots are from integrating-customer-portal

quick bridge
#

Let me check the docs please allow me to make sure I am giving you accurate information

robust holly
#

@cobalt radish Normally if your customer upgrade or downgrade in the middle of a Subscription cycle, it will trigger prorations. Prorations will make sure the gap between old and new data reflected on the next Invoice. If you want to turn off that behavior, you will need to pass in proration_behavior = none

cobalt radish
#

but why would it charge them current month plus next month fee for next billing period

#

this month is already paid

#

Amount Die December 12 is 449

#

not 299

#

due

robust holly
#

The amount charged this month could be the gap when Subscription is upgraded, from the time upgraded to the next billing cycle anchor

#

Do you have a Subscription ID?

#

That we can look further into its detail

cobalt radish
#

yea one sec

#

sub_1JuoavLkmSqBPkgTbtZoYDjk

cobalt radish
#

@robust holly this is one

robust holly
#

Sorry I can be late in response. Will as back as soon as I can!

#

Okie so here is its lifetime change

#

On 5:30 Nov 11 the Subscription is $149

#

On 5:35 Nov 11 the Subscription is updated to $299

#

Hence the unused time from 5:35 Nov 11 to 5:30 Dec 11 is $148.99 (portion of $149)
This unused time is recalculated to new price, which is $298.98 (portion of $299)
Meaning the adjustment for 5:35 Nov 11 to 5:30 Dec 11 is $298.98 - $148.99. This adjustment is calculated and attempted at the same time of the next full Invoice at new price = $299

#

Like you can see here

#

It's just how Proration works

cobalt radish
#

my question about Amount due $448.99

#

my question is about Amount due $448.99

#

due should be 299

#

even with prorate how come due is 448

#

I would understand if it was 299-148

robust holly
#

448.99 is the 299 (for the new cycle starting from Dec 11) + $298.98 - $148.99 (the adjustment for 5:35 Nov 11 to 5:30 Dec 11 is $298.98 - $148.99)

#

so in Dec 11, we collect the payment for Dec 11 to Jan 11 and the adjustment part from 5:35 Nov 11 to 5:30 Dec 11

#

Payment is collected up front. And when adjustment occurs. it will be added to the next Invoice

cobalt radish
#

payment from dec 11 to jan 11 should be 299 if they upgrate it

robust holly
#

yes

#

448.99 is the $299 (for the new cycle starting from Dec 11) + $298.98 - $148.99 (the adjustment for 5:35 Nov 11 to 5:30 Dec 11 is $298.98 - $148.99)

cobalt radish
#

so what settings do I need to change on integrating-customer-portal to disable prorate

robust holly
#

You would need to create a Portal Configuration, with proration_behavior = none first, then use the Portal Configuration to create a Portal Session

cobalt radish
#

based on the link you send looks like "proration_behavior": "none" is default no?

robust holly
#

default is create_prorations, that's why you would want to explicitly set it to no, for your usecase

cobalt radish
#

I tried setting up to none, it worked but when I try to pass prices I am getting errors

#

req_44xITSjvGiduLM

robust holly
#

products should be an array

cobalt radish
#

'features' => [
'subscription_update' => [
'proration_behavior' => 'none',
'products' => [
'prices'=>[ 'price_1JumocLkmSqBPkgThFz0KFY4', 'price_1JumocLkmSqBPkgTn02kRNyo',
'price_1JumsmLkmSqBPkgTs3FwWHFC', 'price_1JumsmLkmSqBPkgTX5lJ8FQH',
'price_1JunhmLkmSqBPkgTirKqa4uE', 'price_1JunhmLkmSqBPkgTSmHyUwgD'
],
'products'=> ['prod_KZxdapIBTzxeRY', 'prod_KZwmuv8GyFOQbT', 'prod_KZwiRiTN6rwRz9']
]
]
],

robust holly
#

I mean the products below subscription_update should be an array itself

cobalt radish
#

what will I do with prices this case

#

if I move them the same level as products

#

I get Received unknown parameter: features[subscription_update][prices]