MEAN Stack / How do I create and manage temporary users without a login or signup? - node.js

Okay so I'm currently developing a bit coin related website!
I want it to work like this:
User visits the page and sees a balance of 0.000BTC + a deposit address.
If the user deposits money to that address it shoos up after x confirmations and updates a mongodb doc with the amount they sent.
The user can then make api calls that do stuff with the doc.
Here's what I don't want:
Users to have to sign up to do this...
How can I accomplish this using angularJS or NodeJS?
I was thinking about doing something with sessions / a mongoDB that uses a TTL collection.
However I can't wrap my head around how to do this correctly.
Any ideas, solutions, or example code would be extremely helpful!
-Thanks

I think that when the money is deposited you should open a user with their deposit email and the ability to update details in his profile later on.
I would send mail confirmation on both deposit and the user profile opened.
That way they don't "sign up" but a user object will be created automatically based on the deposit.
All of this stuff should happen in node BTW (logic and workflow in node, appearance and UX in angular)
Lior

Related

Request and/or receive money via transferwise ~ WISE with a Balance Account Invitation Link

I am new to transferwise and want to ask if the thing i want to do is achiviable via the wise-api
The platform/business needs to automate one action among others:
Business need to ask the User to pay via Wise whenever they feel like ready.
Business give the balance account details (Wise balance account) (i think it is the borderless account, right? or is one of the overseas balance accounts [usd, eur, gbp...] )
User pay to business
Via webhook (i think so) we manage the user info and linked the stuff to the DB
Would be nice if i can use the "Request money" flow-endpoint which give you a payment-link with 14 days of exp. But i think you can't use that in the api :(
Are someone who made something like this before using wise?
I'm so new to wise and it is my first time implementing a thing like this from scratch (i'm the only backend dev haha)
I tried to folllow the docs, and i see the endpoints to do this in the Postman Collection, but i dont know if can solve the needs of the business.
If this the only way?
I cant use the "Request money" flow with the api?
Big thanks for reading!

Best way to handle one-time payments with STRIPE webhooks in nodeJS

I am using STRIPE as my payment processor, in an REACT + nodeJS app. I already have something that already works, but I would like some feedback, maybe I'm doing something wrong.
So... I have this Redirect-To-Checkout functionality thats made available by STRIPE, basically I redirect the user to this STRIPE page where all card-data (sensitive information) is processes in order for the payment to full-fill.
What I do in my nodeJS server part is the following:
Once the user acces the redirect to check-out page, I already create a PendingOrder, with the products selected by client (Here I save some information based on client/stripe payment-intent, in order to check in later steps)
Once webhook gives me the 'payment_intent.succeeded' I check for the payment-intent information to see if it exists in my PendingOrder collection, then proceed to add in to ConfirmedOrders and remove it from PendingOrders.
I have to do this whole process because Stripe no longer gives me access to some information I require when the user is checking-out his order(such as observation that the user has based on the type of service he chooses).
Are there any down-sides to this approach or is there any other way to do it?
Thanks in advance!
You’re not really far from the best practices that Stripe recommends here. The only thing that I would change is listening to checkout.session.completed instead of the payment_intent.succeeded event. As of the latest API version, a PaymentIntent is no longer created upfront so a better to way to handle order fulfillment is to either store the Checkout Session ID (e.g. cs_live_xxx) or you could add some metadata when creating the Checkout Session and use that instead to identify the order.
I have to do this whole process because Stripe no longer gives me access to some information I require when the user is checking-out his order
As for this, I’m not sure what you mean, you can always use your app with the success page customization described here alongside webhooks. I wouldn’t use that to fulfill the order though since the user might close the page before the redirection completes which means that the fulfillment wouldn’t be done in that case. As such, webhooks are essential to order fulfillment.

URL to open a CashApp payment?

I'm building an app where I want users to be able click a link to open up CashApp (as well as various other P2P payment apps), as far along in the transaction as possible. My client doesn't want the app to actually handle the payments, just for it to forward along to a place to make the payment.
So, for example, I can go to venmo.com/username to open the Venmo app to a certain user's profile, which is basically enough for me. (anyone know how to include an amount or message in the url?)
But cash.app/username goes to a webpage that directs me to the App Store get the app, and doesn't even open the app on my phone if it's already downloaded.
Anyone know how to do this?
This is actually quite simple with a universal link:
https://cash.app/$username/amount
The following example will open a cash app payment of $12.50 for the user with username 'helloworld':
https://cash.app/$helloworld/12.50
To pass info to Venmo app you can use:
venmo://paycharge?txn=pay&recipients=someone&amount=9.99&note=For%20Things
This is the url format for Venmo deeplinking:
https://venmo.com/<USER_NAME_1>,<USER_NAME_2>...?txn=<charge|pay>&note=<NOTE>&amount=<AMOUNT>
You can read more about the url format for Venmo Deeplinking here.
##"This is actually quite simple with a universal link:
https://cash.app/$username/amount
The following example will open a cash app payment of $12.50 for the user with username 'helloworld':
https://cash.app/$helloworld/12.50"##
I also used the same format but instead of app I used me:
https://cash.me/$username/5.00/
And when i click on the button with the as anchored:
"href="https://cash.me/$username/5.00/">"
The phone with the APP opens the payment of $5.00 with the username and the person just needs to hit send.
At this time, the ability to integrate with Cash app or accept or send Square Cash payments aren't currently available for Square’s API.

Instagram Approval

I was tasked to develop a web application that has an instagram module in it. The module is supposed to do the following:
1. Display the logged in user timeline
2. Allow user to like and unlike a photo
3. Allow user to comment on a photo
My question is: will the app get approved upon submission or will it be rejected because it replicates original features?
Thanks
There is no API to get user timeline any more, it was deprecated June 1, 2016.
You probably wont get approval since you can do the same on instagram.com, why dont you just use that?
If your app is doing something significant that cannot be done with Instagram app, then there is a chance you will get approved

How can I offer secure links when selling downloads with Stripe?

I'm interested in selling e-books on my site that will come packaged as a ZIP file. I've got the purchase process all hooked up using Stripe's Checkout feature. Once I make a test purchase it's sending me to my "Thank You" page and creating the new customer (cia Stripe_Customer::create) and charge (via Stripe_Charge::create).
How can I offer a download link on this page that can't then just be passed around to anyone else? Is it safer to just ask for their email address and email the ZIP to them?
The best thing to do would probably be to create a download token object in your database, and to have that know about the user and the creation time. Then, the user's download link can be something like download.php?token=f136803ab9c241079ba0cc1b5d02ee77.
When download.php sees a token, it can 1) make sure that it's valid, and 2) that it's being used within n minutes of when the token was created. (And maybe that it's been used fewer than 10 times, or something like that.)
Obviously, this means that the user can't redownload his/her ebook -- you'll need some way of regenerating/reissuing tokens if you want to support that use case.

Resources