#alexelba-payments
1 messages · Page 1 of 1 (latest)
hello again, what Stripe document or guide are you following?
there is always a server-side portion involved
I was looking the demo
originally was following this one
but I think you told me this docs are wrong
docs should not be wrong and if they are they should be fixed
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
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
not clear which line that was on but the rest of the guide should be fine to follow
is there any way to copy live product to test, I know I can copy test product to live
ah no it only works test -> live
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
do you have a link to the Request? from https://dashboard.stripe.com/test/logs/
for the Customer Portal creation
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)
One sec
USD Product: prod_KZvetkPDCLF2j0 -> price_1JulnHLkmSqBPkgT6Cnpuxqs price_1JulnHLkmSqBPkgTfrnrMA9k price_1JulnHLkmSqBPkgTLcXn7DBp
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
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?
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
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
Hello! Catching up, hang on... 🙂
thanks just doing the last part now, for setting up the dashboard and products
When you say it doesn't allow you to set upsell what are you referring to? The Customer Portal settings in the Dashboard?
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
one sec let me check if that works
nope did not work lol
it worked for prod_KZwiRiTN6rwRz9 (price_1JumocLkmSqBPkgThFz0KFY4 price_1JumocLkmSqBPkgTn02kRNyo)
Hm. If you reload the Dashboard does it show up?
Ah, interesting. Glad that worked!
Integrated Dashboard? You mean the Customer Portal?
yup
No, it supports multiple Subscriptions for a single Customer.
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,})
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.
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
Yeah, you need to do something like this:
stripe.createPaymentMethod({
type: 'card',
card: card.cardNumber,
// ...
});
It will automatically find the others.
thanks
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
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?
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
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
Let me check the docs please allow me to make sure I am giving you accurate information
@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
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
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
@robust holly this is one
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
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
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
payment from dec 11 to jan 11 should be 299 if they upgrate it
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)
so what settings do I need to change on integrating-customer-portal to disable prorate
You would need to create a Portal Configuration, with proration_behavior = none first, then use the Portal Configuration to create a Portal Session
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
based on the link you send looks like "proration_behavior": "none" is default no?
default is create_prorations, that's why you would want to explicitly set it to no, for your usecase
I tried setting up to none, it worked but when I try to pass prices I am getting errors
req_44xITSjvGiduLM
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
products should be an array
'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']
]
]
],
I mean the products below subscription_update should be an array itself