Shopify APIs - creating order without receiving payment from end-user - shopify

So we're building a buy-now-pay-later store module in our web-app that will be integrated into Shopify (via Shopify's Storefront APIs).
Our users should be able to make orders through our web app (without payment), and then someone on our end will be able to fulfill the order.
The user would then able to make their payment after the fact (via a custom payment implementation handled on our side), and then a webhook would just update the payment status from 'Pending Payment' to 'Complete' on shopify.
Is this possible via Shopify's APIs? We're trying to find a way to directly create an order without requiring payment, but our devs aren't having that much luck.

It is very much easy to do when you work with Draft Orders. That allows you to create a comprehensive near perfect order in the store. The main advantage is, you get define the payment using API calls. So you can convert this Draft Order to a real one, requiring a payment, when you wish to actually charge the customer, and you do that with code. They are sent an email with a link to a real checkout, allowing them to actually pay. You can also convert the Draft Order to a real order, without sending the customer the generated link to make a payment, and therefore, you can fulfill a real Order in the store, and get the customer to pay later, when you wish.

Related

Shopify problem : Payment gateway isn't setup to test orders

Payment gateway isn't setup to test orders. This store can't accept real orders or real payments.
I add a custom payment to Shopify and when I place order using method the error appears
enter image description here
You can't test real payment methods on development stores.
This is because development stores have limitations on them to make sure that they are used only for development.
You'll have to transfer the ownership to your client. You can find more information here.

Can I use API to Automate Posting Tracking Numbers to orders?

We ship using FEDEX and UPS, and we never found a need to post the tracking number to the payment record, however, recently a customer did a charge-back and the claim was that the order was not shipped even though it was. The tracking number was not entered into paypal, but we do have a tracking number for this order. Do we need to manually enter every tracking number into Paypal, or do we have a chance to enter it after a chargeback attempt has been made?
PayPal's standard API does not provide a field for tracking numbers in their order details, so there is no way to automatically send PayPal this information for all orders.
Their API supports disputes, so it could be possible, however it looks like it could be very messy. The workflow would look like this:
Use PayPal's Customer Disputes API to GET all disputes with a dispute_state of REQUIRED_ACTION and reason of MERCHANDISE_OR_SERVICE_NOT_RECEIVED. Save the Order ID
Cross reference the Order ID with your order management software's API to get a tracking number. If the tracking number exists,
Use PayPal's Customer Disputes API to escalate the dispute to a claim and save the returned claim API endpoint.
The documentation gets a little fuzzy here and may require some contact ith PayPal's support team, but it looks like you should be able to POST evidence to the claim with PROOF_OF_FULFILLMENT, which includes tracking_number and carrier_name.
Unless you are processing a high volume of these missing order claims it probably won't make sense to go through all this legwork. If it truly is taking a lot of time and energy for you or your staff to handle this specific type of PayPal dispute then maybe it would be worthwhile. I might also suggest in this case to start toggling the "signature required" settings for your shipping partners.

Require 3rd party age verification in shopify

I have a requirement to do 3rd party age verification before I ship an order. I'm using a company called EVS for this. They released a shopify app recently, but seems partly baked. It requires a user to enter date of birth when registering for an account and then triggers the verification when the user places an order. The main problem with that is that it's rare for a customer to actually create an account before ordering for the first time -- instead they order first, then shopify emails them to create an account after the fact. Creating the account afterward does not allow the customer to enter DOB.
So I'm planning to implement my own solution. I can use EVS's API to run the verification by sending a combination of Name, Address, DOB, DL# and State, and last 4 of SSN. I have already built a proprietary order management system that pulls in customer and order data, and I can write a client to perform the verification.
I'm less savvy on the shopify side. I need to balance customer friction when placing an order for the first time, against having to do a lot of manual work for verification.
Below are the options I have conceived. Are there any other options? Any ideas for a better solution? Keep in mind I need to verify a customer once. I can tag the customer account as verified, and once verified it's business as usual.
Alter shopify templates to only show the checkout button when a user is logged in. If not logged in, show a "Create an account" button instead. That way the user provides DOB during account creation and the EVS app works as designed.
Set up a separate verification site like verify.my-domain.com. I can trigger an email to the customer upon order creation and ask them to verify. (May have issues with incorrect email addresses or spam filtering.)
If customer is not logged in, or account is not age verified, and they click Checkout, I can redirect them to a page. I can use a form on the page to do the verification. If verification passes, send them on to checkout.
For option 3, I don't know what shopify allows or what best practices allow. Can I use js to pass data to my own server on a different subdomain? Or post the form to another subdomain and then redirect back to shopify?
I'd appreciate any thoughts or suggestions.
You have pretty much summed up all your options, to clarify on them a little:
You can require that customers create an account in the store checkout settings. /admin/settings/checkout
This would work, you could iframe it in too on a custom Page. Or, better, use cross-domain calls or jsonp.
This is a little convoluted and you would have to persist and maintain lot of external state. I'd avoid this
I think a combination of 1 and 2. Turn on "require customer account". Modify the customer account creation page. Implement a cross domain policy with your server which will host custom code leveraging the EVS API.
I'm not sure if you are selling tangible goods or not but with stringent policies on users' age you have to bear in mind that shipping addresses could change. For a tight integration you should look at having webhooks whenever a customer is changed and make sure all their data is still valid since their last EVS approval.
I've been looking into this quite extensively and we've spent a number of hours experimenting with options. Our client in this case is on Shopify Plus so we do have the benefit of access to checkout.liquid.
Our research has led us to believe that one cannot pass the required 'customer note' of the date of birth to the checkout should they be attempting to checkout as a 'guest'. Perhaps because the 'customer' does not yet exist.
Our options have been narrowed down to:
Write a custom backend app that allows Shopify and EVS to communicate directly (XML API on the EVS side) in the checkout process or just prior and then pass the verification status back to Shopify to allow the order to proceed, or append some relevant status marker for the fulfillment department to act accordingly. The EVS app doesn't prevent the order from proceeding, but does flag the customer's age as unverified in the Risk Level panel in the admin. This would be quite a substantial project and by no means low hanging fruit. There is also risk of re-doing a lot of what the EVS app does already and running into they same obstacles they did.
Force customers to register prior to checkout (if not signed in). This seems the most viable approach. The only caveat being that existing customers will not have the customer note (birth date) and we'd need to build a smaller backend app to allow them to append this to their customer account via the Shopify API (this cannot be done via liquid).
These are our findings and I'd love to know more about how you ended up approaching this.

How to use Big Commerce Order API and make customer pay?

I would like to make an API call to Big Commerce backend to complete a purchase on a customer's behalf. Based on the API reference:
https://developer.bigcommerce.com/api/stores/v2/orders#create-an-order
By default, I believe that one can only create an order that not yet paid by the customer. Please correct me if I am wrong.
So, my question is - How do you make a payment on behalf of a customer for the order? It is safe to assume that we have a tokenized credit card of our known customer in a payment gateway like Stripe.
My guess of how it could be done is when an order is created, I can set up a webhook to call the payment gateway to make a charge on the customer's credit card. Is this correct? Are there anything that I should watch out for?
Currently, you cannot use the BigCommerce API to process a payment or full transaction. We only allow payments through the control panel where you can enter credit card details or on the storefront made by the customer. If you'd like to make use of tokenization or recurring payments, it is better to use Rebillia or Recharge (apps).
As you stated, you would need to make a call to Stripe's API to charge the card on file with the customer's token. This should be fine. It won't make any calls back to BigCommerce, so I'd be mindful of error handling (such as if the card has expired) and how you'd retry or mark the order in BigCommerce. Depending on how it was configured, you would want to check order details to ensure you were only processing payments from API created orders.
I'm not sure of what PCI implications might be for the storage of the Stripe tokens. That would be another point for consideration.

Paypal for a buy/sell website

So I'm working on this website where users post their items, other users add some items to their cart and purchase them online.
The flow i was thinking about goes like this:
A merchant posts an item along with their credit cart/ paypal information.
A buyer adds items (from different merchants) to his/her shopping cart and purchases.
The buyer pays by filling a form that includes the payment method fields within the website's layout (no redirection to paypal).
The website will work as a gateway, it will capture the payments from the buyers and pays the merchants accordingly and automatically.
Is this possible using PayPal? if so, what API should I use?
Any input/idea is appreciated...
Thanks,
/t
I have also investigated using PayPal in this way for a site with a similar concept. Unfortunately, PayPal does not allow this. This makes you something known as a Third Party Payment Aggregator which drastically increases the risk associated with providing you a Merchant Account (which is what PayPal is doing). You can read more here.
Though, you could probably do it for a while before PayPal caught on, they could cancel at anytime leaving you high and dry. I recommend investigating Third Party Payment Aggregator solutions (Braintree has something that helps with this).
I guess it is. Use Paypal API
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/howto_api_reference
https://developer.paypal.com/