URGENT - Checkout API returning no line items / empty cart web_url [Sales Channel App]

Solved
Highlighted
New Member
2 1 0

Hello, 

We have a sales channel app that has been using the SHOPIFY CHECKOUT ADMIN API on behalf of the various stores. 

We have been using the 2020-04 version of the API executing POST calls similar to this with success for the last few months; 

 

 

{
	"info": {
		"_postman_id": "7cee5c8c-cd8c-4398-a84a-e09722cbe227",
		"name": "mavely-shopify Copy",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Checkout",
			"protocolProfileBehavior": {
				"followRedirects": true,
				"followOriginalHttpMethod": true,
				"followAuthorizationHeader": true
			},
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "X-Shopify-Access-Token",
						"value": "6d55cb61fbc957970c988185b9b6280e"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n  \"domain\": \"mavely-life.myshopify.com\",\n  \"payload\": {\n    \"checkout\": {\n      \"email\": \"ac@adriancarballo.link\",\n      \"line_items\": [\n        {\n          \"variant_id\": \"14366371086391\",\n          \"quantity\": \"1\"\n        }\n      ]\n    }\n  }\n}"
				},
				"url": {
					"raw": "https://mavely-life.myshopify.com/admin/api/2020-04/checkouts.json",
					"protocol": "https",
					"host": [
						"mavely-life",
						"myshopify",
						"com"
					],
					"path": [
						"admin",
						"api",
						"2020-04",
						"checkouts.json"
					]
				}
			},
			"response": []
		}
	],
	"protocolProfileBehavior": {}
}

 

 

 it has been returning a checkout created with the line items filled in and web_url to a checkout page for those items

However, its just stopped working and now returns something like this: 

 

 

{
    "checkout": {
        "completed_at": null,
        "created_at": "2020-08-09T23:01:36-05:00",
        "currency": "USD",
        "presentment_currency": "USD",
        "customer_id": null,
        "customer_locale": "en",
        "device_id": null,
        "discount_code": null,
        "email": null,
        "legal_notice_url": null,
        "location_id": null,
        "name": "#16041836150902",
        "note": "",
        "note_attributes": {},
        "order_id": null,
        "order_status_url": null,
        "order": null,
        "payment_due": "0.00",
        "payment_url": "https://deposit.us.shopifycs.com/sessions",
        "payments": [],
        "phone": null,
        "shopify_payments_account_id": "acct_1Ekcz2Kiod9AEm7Q",
        "privacy_policy_url": null,
        "refund_policy_url": null,
        "requires_shipping": false,
        "reservation_time_left": 0,
        "reservation_time": null,
        "source_identifier": null,
        "source_name": "3308099",
        "source_url": null,
        "subscription_policy_url": null,
        "subtotal_price": "0.00",
        "shipping_policy_url": null,
        "tax_exempt": false,
        "taxes_included": false,
        "terms_of_sale_url": null,
        "terms_of_service_url": null,
        "token": "297a7d423fa93d05fa91fe62df0f0d95",
        "total_price": "0.00",
        "total_tax": "0.00",
        "total_tip_received": "0.00",
        "total_line_items_price": "0.00",
        "updated_at": "2020-08-09T23:01:36-05:00",
        "user_id": null,
        "web_url": "https://mavely-life.myshopify.com/8743223351/checkouts/297a7d423fa93d05fa91fe62df0f0d95",
        "line_items": [],
        "gift_cards": [],
        "tax_lines": [],
        "tax_manipulations": [],
        "shipping_line": null,
        "shipping_rate": null,
        "shipping_address": null,
        "credit_card": null,
        "billing_address": null,
        "applied_discount": null
    }
}

 

 

 

We changed no code, nothing on the backend end, so perplexed as to what might have happened

This has rendered our entire live sales channel useless now ... any help as to what might have happened would be greatly appreciated! 

 

Thanks

Sean

0 Likes
Highlighted
New Member
2 1 0

This is an accepted solution.

All good, solved this issue realized the issue was the format of the payload in the body of the API call ... needed to remove some of the nesting of line items in checkout

0 Likes