#smileydev-subscription-update

1 messages ยท Page 1 of 1 (latest)

pastel island
pure crow
#

yea, i tried with the first approach.

curl https://api.stripe.com/v1/subscriptions/sub_1JjMq2BicaHE28ep2xNfVtVH \
  -u sk_test_xxxx: \
  -d "items[0][price]"=price_xxx \
  -d "items[0][quantity]"=3```
#

what I am missing here?

pastel island
#

mostly that doesn't work at all :p
That call adds a separate Price to the existing Subscription

#
  -u sk_test_xxxx: \
  -d "items[0][id]"=si_12345 \
  -d "items[0][quantity]"=3```
#

you want ^, you explicitly replace the existing SubscriptionItem id for the current price to change its quantity (or price)

pure crow
#

haha let me check soon. please wait lol

#

๐Ÿ™ it works now

#

btw, is it right to get subscription info from the customer?

#

Its the best approach using if I have a customer id.

pastel island
#

I would recommend storing that information in your database instead

pure crow
#

you mean customer id or subscription id?

#

Yes, I have stored customer id.

pastel island
#

I would store the customer id, the subscription id, all the subscription item ids, the quantity, the Prices, etc.

pure crow
#

Thank you

#

by the way, its okay for increasing quantity, otherwise if I decrease the quantity, how can the remaining money be handled? refund? or for the next invoice?

mighty wren
#

hey there!

#

When you have prorations that create credits exceeding any other balance owed, the credit is added to the customer balance and yes, is used against future invoices.

#

If you wanted to issue refunds to your customers, you can certainly choose to do that

pure crow
#

Thank you @mighty wren , another question, is it possible to payout to the customer from the owner? I have used connect account for this, but I am curious with your message.

mighty wren
#

I'm not sure what you mean, can you rephrase or provide an example?

pure crow
#

sorry for the delay, so far what i have done is about customers can pay the owner with their credit card or bank or so, but opposite feature is possible?

torn mantle
#

Hello! You want to be able to send money to your customers you mean?

pure crow
#

Yes,

#

There is any feature for customers?

#

I know it works with connect account. ๐Ÿ™‚

torn mantle
#

You would need to use Connect for this.

#

You can't do it without Connect.

pure crow
#

Hmmm, As a user of the platform, if a user wants to have two feature as well, user should have two types? customer and connect account?

#

otherwise with connect account they can deposit or payout, right?

#

i am not sure... ๐Ÿ˜†

torn mantle
#

It depends on the specifics of your use case and implementation, but yes, you might have both a Customer and a Connect account that are associated with the same person.

pure crow
#

Yea, I got it. thank you so much @torn mantle its okay to close this thread. ๐Ÿ™‚

torn mantle
#

Sounds good! Have a great day!