How to set up per-seat subscription with Stripe? - google-cloud-functions

Good day!
I am trying build a per-seat subscription model for my web site.
Before, I tried use Checkout session to provide "place", to write personal data, but the max what I reached - is creating default Subscription that you could cancel for instance.
What I wanna do?
• Figure out, if possible, how to create per-seat subscription through Checkout session and after, on event "User joined" automatically replace new price of the subscription.
• If through Checkout session that is not possible, how to implement it through code?
How to get a user's card and how to upgrade later the subscription.
I read the article on Stripe, but from that I can't figure how I get client data as card.
In addition, I use Stripe Extension on firebase with cloud functions.
Hope, this problem will be solved :)

You can create a per-seat type subscription with Stripe Checkout. For that, you need to have a recurring price, just as the article suggests. Then pass the price into line_items property when creating a subscription, along with the initial quantity. For example, a customer might want to purchase 5 seats/licenses right away. You can also enable adjustable_quantity setting to allow the user to change the quantity on the Checkout Session page.
When a new user joins, use the Update Subscription API to change the quantity of the item. For example, if the new total number of users you are serving is 11, set the quantity of the price to 11. More info here.
If you don’t want to use Stripe Checkout, you can create a subscription via API, by following this guide. The upgrade step looks the same as in the other solution.
Besides that, Stripe has a Billing Customer Portal that allows users to modify their subscriptions, it’s worth taking a look.

Related

Update shopify inventory automatically

I have a shopify website, but my fulfilment process is done outside of shopify, meaning that when the customer picks a product, it redirects to another service, were the fulfillment is done, and the the purchase is concluded. Because of that, shopify has no way to know if the purchase is concluded or not, so the store has to be updated manually. This is what I would like to avoid.Is is there an app, or a way I can update shopify by sending a json or a CSV with the updated products? And does uploading a CSV with the entirety of my data to repopulate my inventory a valid idea?
I expect there to be an outside service/App that might be able to help automate this, because I am able to receive a Json file (via an api) with all the info of the products that have been purchased, but I don't know how to use it to update shopify.
Even if you fulfill external to Shopify with a service, Shopify can be set to maintain your inventory by removing the sold inventory. Fulfillment does not really come into play.
Regardless though, Shopify does have an API, and there are handy calls that let you update 100 SKUs with a new quantity, in one API call, at one location. So if you have a CSV or JSON file, it is very easy to use that data to update Shopify. Make authenticated API calls. In the store itself, you can generate a token allowing API updates, and you can test with Postman, meaning your total investment in this is near zero.

Azure API Management subscription event

When a developer ask to subscribe to a particular API product in the Dev Portal, if I checked the 'need approval' option, a workflow is created and the subscription is waiting to be approved by the administrator.
I have a use case where I need to do additional tasks before the approval, in particular I need to create an App in the AD for OAuth2 and set the right permissions.
I'm looking for a way to trigger a Power Automate workflow when a subscription is requested, then use the content of the event to execute tasks and then ask a user to approve the requested subscription (thanks to a Power Automate approval).
Unfortunately, the only way to be informed that a product subscription was requested is to receive an email and unfortunately, the content of this email cannot be customized. The default email content is not really useful to detect what subscription is about and to find additional settings.
Any ideas to manage this?
Here is a walkthrough which uses the Logic App to customize the subscription approval workflow. It might be helpful for your case as well. Check it out: https://github.com/adamhockemeyer/Azure-API-Management-Custom-Subscription-Approval

Forge API: Get all changed items

I need to get a list of all changed items in my project in BIM 360. Can I do this using forge-api.
Ho, regarding with the latest question [If my service is not available and I will miss some webhook events, how can I get all the changes that were made after the last webhook event received] :
If your requirement is to know which items are changed in one folder of Docs, Search API with filter can be of use. e.g. the endpoint below will return all items which are updated since a certain time.
https://developer.api.autodesk.com/data/v1/projects/{{project_id_with_b}}/folders/{{one_folder_id}}/search?filter[attributes.lastModifiedTime]-ge=2019-10-15
More filters options are described at
https://forge.autodesk.com/en/docs/data/v2/developers_guide/filtering/
While if you wanted to know all updates in one call, I do not see currently the way is available. While, Activity API is on the way, it might be helpful to know all activities during a certain dates, then you could filter out what you are interested in and locate the corresponding module>>files/resources etc.. but Activities may probably be categorized with specific scopes e.g. admin activities, project actives, issue activities etc. so it is not one call knows all updates.. And these APIs may not be exposed in the same time.

How to set price for In App product for windows phone 8

I creating IAP for my Windows Phone 8 application. But field "Base price" is disabled and I can't change it.
So what I need to do for creating paid IAP?
Also, if your application is marked as Beta I think the option to set a product price is disabled. Once you get your app properly certified and in the public store I believe it becomes active...
If the "Base Price" option is disabled, check for text immediately below it. Does it say:
You’ll need to provide your tax or bank info (or both) if you want to
submit paid in-app products.
You must provide the necessary information for you to be paid before you can release paid products.
Also if submission is in progress (even if no package was uploaded and the submission was not actually done, basically if step 1 is checked) then the details and prices cannot be changed.
You can cancel the submission (you wont loose anything since you have not actually submitted anything) and then make any change you like.

Get TransactionID from Recurring Profile Information

I have created ReurringPaymentProfile using CreateRecurringPaymentsProfile API and can get all details of the profile using GetRecurringPaymentsProfileDetails API.But now i want make function by which site admin can refund any amount of any transaction.
I have already worked with RefundTrasaction API but that is with Ecommerce.But for RefundTrasaction we need TransactionID but in recuruing payment i have not get the tansction id.
Can any one help to get the transction id for RefundTRansction API. Or How i will refund the subscription Money using API.
Thanking you all
Check this link .
It give step by step description about creating recurring profile.
https://developer.paypal.com/docs/classic/express-checkout/ht_ec-recurringPaymentProfile-curl-etc/