How To Send Gift Card Mail With External Api - shopify

i tried to build a custom gift card app to shopify.
one of the functionality is that the customer can send the giftcard to other customer.
i create a webhook that listen to order creation an get the info.
if there is a line item property like "send to other" i want to prevent shopify automatic mail and send it from my api, to the email that the customer insert in "email to send" line item property.
any ideas how i can do that ? i know that gift card hero app do something like this.
thanks for the help !
i didnt tried anything yet cause i dont find any solution

Related

PayPal and payment implementation

I am designing a website that accepts payment through simple PayPal or Stripe buttons, but also has a section that pays out users through PayPal. What is the best way to do this?
Current setup: The user builds up coins through an action (NDA won't allow me to discuss in detail) and when their coins reach a certain amount, they can cash out in real $. I have designed this flow: Pay Me Now Button -> Screen with PayPal email address input. Repeat email for typos, then Confirm Button -> Success screen
However, the client would prefer a direct link out to PayPal instead of manual input of email addresses. The reasoning is that they would prefer it being arranged through PP's service to reduce manual errors and typing out. As far as I am aware the only way to get paid is through writing down an email address/phone number. I have researched PayPal.me buttons but it still isn't making sense. Maybe there's another service altogether that I can suggest to the client for paying out users in a no-friction way?
I'm looking at how user testing sites pay people, but not getting very far.
If the money is in your client's PayPal account and they wish to send it to a user's email address (that may or may not have a PayPal account already), this can be automated with PayPal Payouts.
If the user does not have a PayPal account already they will receive an email notification and have 30 days to create an account or add the email to an existing account. If they don't, the payment will be refunded automatically.

How does one associate a website user with a Paypal subscription?

I am implementing subscriptions to a premium service on a website using Paypal as the payment service. I have successfully created a Catalog Product and Billing Plan through the API, and I am able to get to the payment page on Paypal, but it's not clear how I'm supposed to persist a user identifier through the purchase process.
I assumed it would be something along the lines of passing a user id somewhere, but there's nothing in the Paypal documentation about this. I need to be able to let the user make a purchase and have the Paypal webhook send the confirmation to an endpoint on my site, and that's where I'd expect to get their user id to toggle the subscription on their account on my end.
Is there something I'm missing? There has to be a way to do this cause I'd imagine it's a pretty common use case. If anyone has information or has done this before, I'd love to hear. Thanks.
The only truly secure way I've found when using javascript SDK, is to securely generate a unique custom_id on your server side associated with the user.
Then when you create the buttons, the 'createSubscription' function takes custom_id as a parameter.
Then use a webhook to receive events from your subscription and the custom_id will be present in the body of all BILLING.SUBSCRIPTION events under resource.custom_id.
I am able to get to the payment page on PayPal,
You are vague about what you are doing here. There are multiple ways (and some ways have multiple versions) of accepting subscriptions via PayPal, so it is important that you provide full details about the method you are using.
The time to associate a created subscription ID with a user ID is when it is approved, in the onApprove function if you are using a Smart Payment Button: https://developer.paypal.com/docs/subscriptions/integrate/#4-create-a-subscription

remove shipping option using PayPal ButtonManager API

I'm using PayPal's ButtonManager API to dynamically create a hosted button.
When the user clicks on the "buy now" button, he's taken to a payment page where he can log in to his paypal account or pay by credit card.
Now what happens is that while giving his payment info, there's also shipping address info.
What I want to do is remove shipping address option entirely. My products are digital so I'm not doing any shipping and don't want any shipping to display.
Is there any HTML variable that I can pass through the button to ensure this? I know there's a no_shipping variable, which allows users to enter shipping address or not, but I don't even want this. I just want no shipping info at all. Is this possible?
Looking at this solution for Express Checkout:
Disable shipping address option in PayPal Express Checkout
I simply set L_BUTTONVAR4=no_shipping=1 in the NVP query string call to the Button Manager API, and it worked!

When will Shopify include customer webhooks?

Does anyone have any idea when/if Shopify will offer 'customers/created', 'customers/updated', and 'customers/delete' webhook events?
It would be great to be able to have our app notified when merchants are making changes to their customer records via their Store admin, or when someone creates a customer account without having completed an order.
They now exist! Check them out at http://api.shopify.com/webhook.html

Google checkout invoice through API

I am trying to find a way of sending email invoice via google checkout's API (and also in PayPal)
I can't find how. or at least how to generate a new order (money request)
thank you
From: http://code.google.com/apis/checkout/developer/Google_Checkout_Comparison_Part_I.html
Requesting Payment by Email Invoices
What is it? Email invoicing lets you sell without an online store. Buyers can place orders from you by phone, fax, email or other offline means; then you send email invoices from the Merchant Center to the buyers requesting payment. Email invoices contain a personalized message from you regarding the requested payment as well as a "Pay now through Google Checkout" link. When buyers click this link, they are brought to Google Checkout where they can complete the payment process.
Best for: Use this option if you don't have or need an online store.
Time required: There's no setup — just open a Google Checkout merchant account and you can immediately start sending invoices.
Technical skills required: None. Just Internet access.
Demo: Email Invoice and Wizard (requires sign-up)
Processing Orders: (Part II) Once orders start coming in, use the Merchant Center to charge orders and update order status.
Next Step: How to request payments by email invoices
From what I've seen, looks like they don't have a way to do this through an API. Hopefully someday they will, but for now I think I'll have to create my own email with a link to my own page that sends them to google checkout via a custom Buy It Now button.
It's too bad - it'd be so simple to just be able to call send_email(name, email, amount, message) and have it be the same as logging in & doing it through the Merchant Center.
I do understand the rationale a little - if you're capable of creating an automated invoicing system that can call a google API to send emails, then you should also be capable of creating a link, custom button, and letting the user checkout that way. I still want it though - I'm lazy.
Can you submit the form data in the way that the google checkout portal does? then it would authenticate and autofill the form?