1

I want to place orders on behalf of a customer. I have an integration token for this. I have followed the below steps.

  1. Create Empty Cart = POST /V1/carts (Passing customer Id as param)
  2. Add product to cart = POST "/V1/carts/".$quote_id."/items" (Passing product data)
  3. Get Shipping methods = POST "/V1/carts/".$quote_id."/estimate-shipping-methods"
  4. Set shipping and billing = POST "V1/carts/".$quote_id."/shipping-information"

The above steps are working fine. Now I need to set the payment method and place the order. How can I do it?

0

I have followed the below steps to place an order on behalf of a customer using integration token.Now it is working fine.

  1. Create Empty Cart: /V1/carts/mine => POST with payload {'customer_id':{customerId}}. It returns the cartId
  2. Add Products to cart: /V1/carts/{cartId}/items => POST Request
  3. Get Cart Totals: /V1/carts/{cartId}/totals => GET Request
  4. Estimate Shipping methods: /V1/carts/{cartId}/estimate-shipping-methods => POST Request ( It list all availble shipping methods)
  5. Set Billing and Shipping: /V1/carts/{cartId}/shipping-information => POST Request (It returns the availble payment methods)
  6. Set Payment and place order: /V1/carts/mine/payment-information => POST Request (It returns the Order increment Id)
  7. To get the order Details: /V1/orders => GET Request with search criteria

searchCriteria[filter_groups][0][filters][0][field]=increment_id&searchCriteria[filter_groups][0][filters][0][value]={IncrementId}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.