cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 : Try to checkout product via REST service

Magento 2 : Try to checkout product via REST service

I try to post checkout via REST api. The cart was aleardy successfully created. Checkout REST service URL

$baseUrl . 'rest/V1/guest-carts/' . $cart_id . '/shipping-information';

Parameters

 

  $post_fields = '{
   "card_id" : ' . $cart_id . '
	"address": {
		"city": "noida",
		"company": "HCL",
		"country_id": "IN",
		"email": "kalsi122112@hcl.com",
		"firstname": "Abhijeet",
		"lastname": "Kalsi",
		"postcode": "201301",
		"region": "UP",
		"street": ["A-8,9","Noida"], 
		"telephone": "18002003000"
	},
  }';

$post_fields = '{ "card_id" : ' . $cart_id . ' "address": { "city": "noida", "company": "HCL", "country_id": "IN", "email": "kalsi122112@hcl.com", "firstname": "Abhijeet", "lastname": "Kalsi", "postcode": "201301", "region": "UP", "street": ["A-8,9","Noida"], "telephone": "18002003000" }, }'; Please help, what I am doing wrong and provide some example to move product to checkout stage. Thanks in advance Smiley Happy