I am trying to create a stripe webhook for sending a notification to user email (not customer) every time a customer adds credit card to his account. Talked with stripe support team but, the only information they gave me was too implement it through stripe webhooks.
Stripe has some notification that we can enable and that will send notifications to user email but, it does not have a notification for when customer adds credit card details to his account and I am trying to implement that. Thanks in advance
I've already installed ngrok to run the webhook but, I do not know how to set up enpoint and create the webhook to send notifications to user
You can sign in stripe, Navigation to Webhooks in left dashboard. And then create a webhook endpoint with ngrok host and your webhook API route. Example,
you create an webhook endpoint API like POST /api/v1/webhooks/stripe => Your webhook endpoint is: https://ngrok.abc/api/v1/webhooks/stripe
Click here to redirect to stripe webhooks page
I'm not sure what you mean by "sending a notification to user email (not customer)" but Stripe generally won't send emails to your users.
You'd have to implement sending an email on card update yourself. Have a look at implementing webhooks (https://stripe.com/docs/webhooks/setup) and then listening for the customer.source.created event (https://stripe.com/docs/api/events/types#event_types-customer.source.created).
Will a Slack notification work for you? Here’s an automation I created using Pipedream’s free service that listens for Stripe's customer.source.created event (based on #Paul Asjes suggestion) and sends a message to Slack:
https://pipedream.com/#pravin/send-message-to-slack-when-payment-method-added-in-stripe-p_7NClk5
To use it:
Fork the template
Create an incoming webhook URL in Slack and add it to the Pipedream workflow
Copy the Pipedream endpoint and set it as the webhook URL for customer.source.created events in Stripe
I hope that's helpful! I confirmed that it works with a test event from Stripe. If the notification has to an email, do you use any email services like Sendgrid?
Related
Want to integrate Bot in MS Teams channel for auto replying messages/welcoming users/etc. For that created Bot in Azure and as part of the configuration it required messaging endpoint and it should be publicly accessible HTTPS. But due to security reason and limitations, unable to expose the server. Is there any other way we can achieve it without exposing the server to publicly?
To request an access token from the login service, issue the following request, replacing MICROSOFT-APP-ID, MICROSOFT-APP-PASSWORD and MICROSOFT-TENANT-ID with the bot's AppID, password and tenant Id that you obtained when you registered your bot with the Bot Service.
The Teams backend servers need to be able to communicate with your bot, via the Bot Framework Service infrastructure, so the bot definitely needs a live, public httpS address. However, there are options to "tunnel" that to an on premises environment, e.g. CloudFlare Tunnel and I think Azure has a service for this as well.
In addition, any message your bot receives from Teams will have a Tenant ID associated with it, so you can verify that the message is from Teams, that the TenantId exists and that it matches your tenant. Here's a sample to do this: https://github.com/OfficeDev/microsoft-teams-sample-complete-csharp/blob/master/template-bot-master-csharp/middleware/Middleware.cs
Finally, you can look to implement SSO in your bot to securely authenticate the user and get the tenant Id from there as well. See here: https://learn.microsoft.com/en-us/microsoftteams/platform/sbs-bots-with-sso
I have a gmail addon that's supposed to be paid. I have set-up serverless Lambda functions for API calls to the backend along with the API Gateway to protect unauthorized access to the function. The next step is to implement Stripe Integration. The flow of payment integration in most Gmail addons is that the user is redirected to the website, where he's asked to sign-in and then subscribe to one of the payment plans. The website that i have is built in Squarespace. I want to the user to sign-in using the Cognito Google Sign-in and then subscribe to one of the recurring payment plans. Afterwards, I'd either like to update 5 custom user pool attributes that hold information regarding the user's subscription status to be used inside the lambda authorizer.
I've looked at the commerce tab inside the Spacesquare which has an option to connect stripe but there are a few problems.
The products that I've created in Stripe aren't synced.
The user should first be signed-in through Cognito and there doesn't seem to be an appropriate plug-in that solves this problem according to my knowledge.
If i use my own custom sign-in. How will squarespace keep track of everything regarding the subscriptions?
I am developing a React native application where I want to sent an SMS for OTP. I used AWS SNS for publishing messages after subscribing them to a topic, but I found that the price is quite high since the SMS is transactional.
I wanted to use Firebase Messaging Cloud since they do it for free but I don't really know how to proceed with it. Do I have to createPlatformApplication and then do createPlatformEndpoint for every user to send messages? This is a bit confusing for me, so if someone could give me an overview of the initial processes, it would do me wonders.
This is how I am doing it now simply using subscribe and publish:
I understood your question as asking how you could deliver OTP codes using push notifications.
To do that, you would:
Set up a platform application through SNS: https://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-register.html
Create an endpoint for each end device you want to send these notifications to: https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html
Do a direct publish to that endpoint to send the notification only to that person: https://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-directmobile.html
For this use case, you do not need to use topics and subscriptions, since all of your messages will only be targeting one person.
ideal look
Webook would dm user specific info inputted into the form on my website:
name, age, location.
Discord Web hooks can be used to send messages to servers but it can not be used for direct messaging users. You can read more about discord web hooks here
Webhooks can't send messages in direct messages or groups. But they can send in a discord server.
However, if you want to send a message to a user in their DMs, you can create a simple bot for that.
I want to authorize the payment with Paypal on the client-side (React) and then the payment is to be captured on the server-side (ASP.NET). Is this possible using any library provided by Paypal? How can it be achieved?
You might want to take a look at webhooks from Paypal API. You can configure a webhook listener and subscribe it to any event you are interested in getting notified of. Paypal will then notify you (by sending an HTTP POST notification to a URL listening on your server that you have to provide when you configure the webhook) when any of the events you subscribed to occur.