What API or APIs are needed.

jcarrino
New Member
2 0 0

Scenario

- We need to submit customer order information and process a payment

 

The customer information that is submitted to Shopify contains the following:

- Name, billing address, shipping address

- Credit card, expiration date, ccid

- Item skus, quantities, amounts

 

We need to know which API (or APIs) we can invoke in order to accomplish creating the customer order and process the payment.

 

Based on their website, it looks like we need to invoke the following three, but we need to know for sure:

 

Create order

POST /admin/api/2020-04/orders.json

 

Store credit card

POST https://elb.deposit.shopifycs.com/sessions

 

Create payment

POST /admin/api/2020-04/checkouts/#{token}/payments.json  

 

Thank you community.

0 Likes
hassain
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 134

Hey @jcarrino ,

 

If you are looking to create a new order and they process the payment for that order all via REST APIs, the three APIs you need are

  1. POST /admin/api/2020-04/checkouts.json - Creates a Checkout. Returns the unique checkout 'token' in the response
  2. POST https://elb.deposit.shopifycs.com/session - Stores a credit card in the card vault
  3. POST /admin/api/2020-04/checkouts/#{token}/payments.json - Creates a new payment for the checkout  created in step 1, thereby now making it an actual Shopify Order

However in order to do API calls 2 and 3, you need to request for payment processing access from Shopify: Request payment processing.

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
jcarrino
New Member
2 0 0

Thank you @hassain.  Is there also a way while we are developing the API, our customer service can take orders and batch upload them nightly into shopify for order processing?  Thank you for your assistance. 

0 Likes
hassain
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 134

Hey @jcarrino ,

 

There's no functionality to creates Orders in bulk via any Shopify Admin API. You will have to create a script or program that will loop through all the orders you want to create every night and then use the Shopify Admin API to create each order one at a time. You can look into some of the various Shopify API libraries out there, like the one for Ruby (https://github.com/Shopify/shopify_api) or the one for Python (https://github.com/Shopify/shopify_python_api)

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes