Passing custom data to Stripe email receipt - laravel

I'm using Stripe's Payment Intents API (via a Payment Element) to accept payments on a site and automatically send email receipts on successful payment. I now need to send the product (a digital code) to the user inside of the receipt email, but the closest solution I've found to do this is using the description parameter of the Payment Intent object.
Unfortunately, Stripe displays the description as part of the order summary with a redundant item price right next to it:
This doesn't does look the best and I'd prefer to be able to pass in a separate section of the email, such as above the order summary.
Is there a more natural way this can be done with Stripe's email receipts?

When passing custom data to Stripe email receipt, the solution you found (e.g. to pass that data via the description parameter) is the only option on the automatic email receipts. Alternatively, you can listen to payment_intent.succeeded webhook event and handle emails from your end.

Related

Generate payment link and sms invoice using Zoho Books API

My application needs me to send a payment link to the customer via SMS. Once the payment is done, capture it and create a paid invoice and again send it via SMS to the customer. But I observed
There is no API to generate a payment link
Invoice cannot be sent via SMS.
Is there any other way of doing this?
There IS payment link API, it's just not documented.
If you POST something like
{
"customer_id": 123456000001234567,
"payment_amount": "1.00",
"expiry_time": "2022-04-30",
"description": "TEST"
}
to https://books.zoho.[eu]/api/v3/paymentlinks?organization_id=123456
you will get a new payment link with default contact email and status "generated". You can get URL from the response->payment_link->url.
Unfortunately, I didn't find out how to change the status of the payment link.
You can also send an email with POST to /api/v3/paymentlinks/{paymentlink_id}/email?organization_id=123456 if you specify subject, body and to_mail_ids array, and also do changes with PUT to i.e. expiry_time, but it would be great to know how to mark payments.

In Dynamics 365, how to customize the email page to add custom image based on email recipient?

We have an enterprise web api that generates a custom coupon barcode for based on customer id or email.
The Dynamics 365 email activity can send out rich emails; we want to insert custom barcode image into the email.
I have already added a button to this ribbon of this page so that it call open a popup window that can execute my javascript.
But I need to get the email address of the recipient in the "To" field of the email. How do I get this field?
When you are opening the popup, you can send the contact detail in param. Or you can read the parent form fields like discussed here based on your implementation.
Either way, you have to get the activity party list from To field & again you have to make a service call to pull email address. Because only Id & Display Name will be readily available in party list or lookup. Everything else has to be retrieved from server.

Send Mailchimp Campaign to Single Email Address

I'm creating custom emails (many customizations) in MailChimp campaign builder. Looks like the only option to send is via a campaign, which I'd need to manually upload a list of email addresses. I honestly just want to use the builder to send a quality form email, that I customize for each recipient.
Is it possible to send an email to a specific email address without building a list, etc? This will probably be a one-time thing.
You can send campaign to single email address in mailchimp through this method. However you can't send the same campaign more than once to same email address.
create an automation email with API 3.0 as trigger.
Now, to send a campaign, make POST call to the given url with email address in your mailchimp
https://us19.api.mailchimp.com/3.0/automations/********/emails/********/queue
Now, To call that api you need to add HTTP BAsic Auth or OAuth 2 to API Request. See this answer MailChimp 3.0 HTTP POST Json Example
There's also a npm module to make life easier https://npmjs.com/package/mailchimp-api-v3
This is just a workaround as mailchimp was not built for single emails. In the longer run I'd suggest you to look into mandrill, sendgrid or other transactional email tool.
You are better off using Mandrill, MailChimp's transactional email app, to send one off emails. You can still use or at least make use of MailChimp campaigns but you can send one off emails that are customised and you do not need to send to a list

Is it possible to add a 'pending' subscriber to Mailchimp via the API?

Here's what I'd like to do:
User completes sign up form on my app
My app sends the input data (email address, name, etc) to Mailchimp via the API, but with a status of 'pending'
My app sends an email to the user asking them to confirm their email address (essentially emulating the Mailchimp confirmation email)
User clicks link in confirmation email, which takes them back to a confirmation page in my app
My app updates the user's status in Mailchimp to 'subscribed' via the API
Essentially, I want to emulate Mailchimps standard confirmation process, but sending the emails from my own app.
The part that I don't know how to do (or don't know if it's possible) is the part where I add a new subscriber with a status of 'pending'.
Here's some further info that's not strictly relevant but may be of interest...
Why don't I just use the standard Mailchimp confirmation email?
The confirmation email needs to contain extra info, unique to each user, that Mailchimp will not have access to.
Why don't I collect all the data locally and then send it all to Mailchimp once the user has confirmed their email address?
For reasons I won't go into, the number and type of required fields will be unknown. At the point when the sign up form is displayed, I will request the list of fields from Mailchimp and display the necessary fields. It is possible that, between the time when the user initially completes the form and the time when the user confirms via email, the required fields will have been changed. If I try to submit the previously collected data to Mailchimp after the required fields have been changed, it will cause an error.
So I need to collect and submit all data to Mailchimp at the same time. And then simply 'switch on' that user in Mailchimp once (s)he has confirmed.
I hope I've provided enough info. If not, happy to provide more or clarify any points.
Thanks!
The internal "pending" status is not able to be managed manually like that. You can subscribe them using double opt-in and then later force them onto the "subscribed" list, but you can't stop them from getting MailChimp's own confirmation email.
One possible work-around would be to add an interest group or merge field that is populated by your system once you've confirmed the email address. You'd then create a saved segment for only confirmed users and make sure you only ever send to that segment and never the whole list.
Another possibility, if you use API v3.0 (which is currently only in beta), is to add them to your list as unsubscribed and then switch their status to "subscribed" once you've confirmed them. If you do this, be very careful that you're not re-subscribing users who unsubscribed or you could wind up in trouble.
This workflow is definitely 100% possible in the current (V3) of the API. Just set the "status" field on a member to "pending" and then to "subscribed".

Sending Email receipt from Authorize.net transaction on my website

I am using Authorize.net AIM on my website to accept donations/payments. Authorize.net automatically sends an email receipt to the customer once they have made the purchase, but I wish to disable this and send an email using my own email receipt template (in .html).
Previously I have sent emails using this format after I have inserted a username and email address into mySQL from a form on my website - it worked great.
I now wish to do this same thing, but instead of inserting information into a database, using the information from their donation (amount, email address, confirmation) to send them an email.
I was using Swift to send the emails. This worked great.
How would I use php to do the same thing but with the information from my authorize.net coding?
You could use Authorize.net's API and SDK and call the GetTransactionDetailsRequest with the transId and pipe the results to your customer's email with your own custom HTML email template.

Resources