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.
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
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
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.
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
User | Count |
---|---|
12 | |
12 | |
10 | |
7 | |
6 |