Follow

I added my shipping + tax endpoint, but it's still not showing any options?

Make sure you are registering the correct hook.

Bolt will call this hook to get shipping options and tax rates during checkout, so if the correct response isn't being passed back, Bolt will be unable to show the various options. 

 

SAMPLE REQUEST

{  
   "shipping_address":{  
      "street_address1":"1235D Howard Street",
      "street_address2":"Unit D",
      "locality":"San Francisco",
      "region":"California",
      "postal_code":"94103",
      "country":"United States",
      "country_code":"US",
      "first_name":"Jane",
      "last_name":"Doe",
      "company":"Random Inc.",
      "phone": "111-222-3344",
      "email":"abc@test.com"
   },
   "cart":{  
      "total_amount":15491,
      "order_reference":"1923",
      "tax_amount":15,
      "shipments":[  

      ],
      "currency":"USD",
      "items":[  
         {  
            "name":"Item1",
            "reference":"1",
            "description":"Item1 is everything you'd expect",
            "sku":"SK-1",
            "total_amount":5908,
            "unit_price":844,
            "image_url":"https://placeimg.com/30/30/animals,
            "currency":"USD",
            "quantity":7,
            "tax_amount":0
         },
         {  
            "name":"Item3",
            "reference":"3",
            "description":"Item3, the new gold standard",
            "sku":"SK-3",
            "total_amount":8917,
            "unit_price":8917,
            "image_url":"https://placeimg.com/30/30/animals",
            "currency":"USD",
            "quantity":1,
            "tax_amount":0
         },
         {  
            "name":"Item4",
            "reference":"4",
            "description":"you haven't lived until Item4",
            "sku":"SK-4",
            "total_amount":196,
            "unit_price":28,
            "image_url":"https://placeimg.com/30/30/animals",
            "currency":"USD",
            "quantity":7,
            "tax_amount":0
         }
      ],
      "display_id":"792417"
   }

 

SAMPLE RESPONSE

 

{  
   "shipping_options":[  
      {  
         "service":"Ground Shipping (5-7 Business Days)",
         "cost":{  
            "amount":0,
            "currency":"USD",
            "currency_symbol":"$"
         },
         "signature":"I3A8bZTQb7GcEYWcy1o3NQIVzP"
      },
      {  
         "service":"Overnight (1 Business Day)",
         "cost":{  
            "amount":35000,
            "currency":"USD",
            "currency_symbol":"$"
         },
         "tax_amount":{  
            "amount":2538,
            "currency":"USD",
            "currency_symbol":"$"
         },
         "signature":"O3r2hHMM9TDYwhKW0WWn4YBCGhC"
      }
   ],
   "tax":{  
      "rate":725,
      "amount":1088,
      "items":[  
         {  
            "rate":725,
            "amount":428
         },
         {  
            "rate":725,
            "amount":646
         },
         {  
            "rate":725,
            "amount":14
         }
      ]
   }
}
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments