Checkout Address Blank, But it isn't

almax120
Shopify Partner
17 0 0

I'm building a sales channel and processing a sale. I sometimes get the error that says the billing/shipping/shipping_line can't be blank. However, all the information is present in the checkout object. I do not understand what is going on.

Does anyone have any clue why this happens?

 

RESPONSE HEADER: {
  date: 'Sat, 21 Aug 2021 02:25:33 GMT',
  'content-type': 'application/json; charset=utf-8',
  'transfer-encoding': 'chunked',
  connection: 'close',
  'x-sorting-hat-podid': '166',
  'x-sorting-hat-shopid': '53088682151',
  vary: 'Accept-Encoding',
  'referrer-policy': 'origin-when-cross-origin',
  'x-frame-options': 'DENY',
  'x-shopid': '53088682151',
  'x-shardid': '166',
  'x-stats-userid': '',
  'x-stats-apiclientid': '4932475',
  'x-stats-apipermissionid': '314173161639',
  'x-shopify-api-version': '2021-01',
  location: 'https://dev-rap-snacks.myshopify.com/admin/api/2021-01/checkouts/06ebb6269c6462b3f2e650bef6e036f5.json',
  'strict-transport-security': 'max-age=7889238',
  'x-shopify-stage': 'production',
  'content-security-policy': "default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com https://widget.intercom.io https://js.intercomcdn.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=show&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fabandoned_checkouts&source%5Bsection%5D=admin_api&source%5Buuid%5D=8adb2256-1e44-44a5-b9e8-b025ebdae770",
  'x-content-type-options': 'nosniff',
  'x-download-options': 'noopen',
  'x-permitted-cross-domain-policies': 'none',
  'x-xss-protection': '1; mode=block; report=/xss-report?source%5Baction%5D=show&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fabandoned_checkouts&source%5Bsection%5D=admin_api&source%5Buuid%5D=8adb2256-1e44-44a5-b9e8-b025ebdae770',
  'x-dc': 'gcp-us-central1,gcp-us-east1,gcp-us-east1',
  nel: '{"report_to":"network-errors","max_age":2592000,"success_fraction":0.0001}, {"report_to":"network-errors","max_age":2592000,"success_fraction":0.0001}',
  'report-to': '{"group":"network-errors","max_age":2592000,"endpoints":[{"url":"https://monorail-edge.shopifysvc.com/v1/reports/nel/20190325/shopify"}]}, {"group":"network-errors","max_age":2592000,"endpoints":[{"url":"https://monorail-edge.shopifysvc.com/v1/reports/nel/20190325/shopify"}]}',
  'x-request-id': '8adb2256-1e44-44a5-b9e8-b025ebdae770',
  'cf-cache-status': 'DYNAMIC',
  'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
  server: 'cloudflare',
  'cf-ray': '682069553e6b28bd-DFW',
  'alt-svc': 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400'
}

EXISTING CHECKOUT DATA: {
  completed_at: null,
  created_at: '2021-08-20T21:07:44-05:00',
  currency: 'USD',
  presentment_currency: 'USD',
  customer_id: 5182528815271,
  customer_locale: 'en',
  device_id: null,
  discount_code: null,
  email: 'EMAIL ADDRESS',
  legal_notice_url: null,
  location_id: null,
  name: '#22349943734439',
  note: '',
  note_attributes: {},
  order_id: null,
  order_status_url: null,
  order: null,
  payment_due: '25.19',
  payment_url: 'https://deposit.us.shopifycs.com/sessions',
  payments: [],
  phone: null,
  shopify_payments_account_id: 'ACCOUNT_ID',
  privacy_policy_url: null,
  refund_policy_url: null,
  requires_shipping: true,
  reservation_time_left: 0,
  reservation_time: null,
  source_identifier: null,
  source_name: '4932475',
  source_url: null,
  subscription_policy_url: null,
  subtotal_price: '25.19',
  shipping_policy_url: null,
  tax_exempt: false,
  taxes_included: false,
  terms_of_sale_url: null,
  terms_of_service_url: null,
  token: '06ebb6269c6462b3f2e650bef6e036f5',
  total_price: '25.19',
  total_tax: '0.00',
  total_tip_received: '0.00',
  total_line_items_price: '27.99',
  updated_at: '2021-08-20T21:24:06-05:00',
  user_id: null,
  web_url: 'https://dev-rap-snacks.myshopify.com/53088682151/checkouts/06ebb6269c6462b3f2e650bef6e036f5',
  line_items: [
    {
      id: 'bea7b3c5493c7aafd2716167f9d84c6c',
      key: 'bea7b3c5493c7aafd2716167f9d84c6c',
      product_id: 6261909520551,
      variant_id: 38109593567399,
      sku: null,
      vendor: 'Sterling Ltd',
      title: 'Gemstone Necklace',
      variant_title: 'Blue',
      image_url: 'https://cdn.shopify.com/s/files/1/0530/8868/2151/products/blue-gemstone-pendant_925x_6578c5ea-9048-4e9c-8779-46320eda9200.jpg?v=1612818905',
      taxable: true,
      requires_shipping: true,
      gift_card: false,
      price: '27.99',
      compare_at_price: '29.99',
      line_price: '27.99',
      properties: {},
      quantity: 1,
      grams: 0,
      fulfillment_service: 'manual',
      applied_discounts: [],
      discount_allocations: [Array],
      tax_lines: []
    }
  ],
  gift_cards: [],
  tax_lines: [],
  tax_manipulations: [],
  shipping_line: null,
  shipping_rate: null,
  shipping_address: {
    id: 9272302174375,
    first_name: 'Lonzo',
    last_name: 'Dawg',
    phone: null,
    company: null,
    address1: 'A VALID ADDRESS',
    address2: 'Apt 115',
    city: 'Austin',
    province: 'Texas',
    province_code: 'TX',
    country: 'United States',
    country_code: 'US',
    zip: '78741'
  },
  credit_card: null,
  billing_address: {
    id: 9272302174375,
    first_name: 'Lonzo',
    last_name: 'Dawg',
    phone: null,
    company: null,
    address1: 'A VALID ADDRESS',
    address2: 'Apt 115',
    city: 'Austin',
    province: 'Texas',
    province_code: 'TX',
    country: 'United States',
    country_code: 'US',
    zip: '78741'
  },
  applied_discount: {
    amount: '2.80',
    title: 'Discount',
    description: 'Exclusive discount',
    value: '2.80',
    value_type: 'fixed_amount',
    non_applicable_reason: null,
    applicable: true
  }
}


ERROR: {"checkout":{"billing_address":[{"code":"blank","message":"can't be blank","options":{}}],"shipping_line":[{"code":"blank","message":"can't be blank","options":{}},{"code":"blank","message":"can't be blank","options":{"code":null}}]}}

 

Replies 3 (3)
csam
Shopify Staff
Shopify Staff
267 40 43

Hi @almax120 

Could you please try the same request, but with a phone number included in the billing address? I think it's possible the error message being returned is not fully accurate. Please let me know the outcome!

CS | API Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

almax120
Shopify Partner
17 0 0

That same request succeeded a while later. Its an on and off issue that i cannot pinpoint.

csam
Shopify Staff
Shopify Staff
267 40 43

Okay, I understand. I think it would be best if you could contact support directly via the partner support Beta bug reporting form so we can investigate this for you further. This will allow us to authenticate you as having an account on the shop and provide more in-depth support. Please include as much info as possible - it would be ideal if you could provide an x-request-id for a failed and a successful attempt at the same call. 

CS | API Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog