Create Tax Quote

Definition

https://sandbox.bluesnap.com/services/2/tax-quote


Documentation

This request allows you to create a tax quote based on details about the purchase, such as the tax codes for the items being purchased and the shopper's address. For implementation details, see the Tax Guide.

📘

Tax quote expiration

A tax quote will expire 24 hours after its creation unless you send the transaction to BlueSnap before then. If a tax quote expires before the transaction has been sent to BlueSnap, you'll need to create a new one.

JSON Request Content

Send a taxQuote object, with the following:
     currency     string    required
     lines     array    required (see lines)
     requestDate     string    optional
     shipFrom     object    optional (see shipFrom)
     shipTo     object
  required (see shipTo)

JSON Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the taxQuote object (see taxQuote (JSON object)).


JSON Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/taxQuote \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
  "currency": "USD",
  "shipTo": {
    "address": "1768 Mirassou Place",
    "city": "San Jose",
    "state": "CA",
    "zip": "95124",
    "country": "US"
  },
  "lines": [
    {
      "quantity": 1,
      "amount": 100,
      "taxCode": "PS081282",
      "itemCode": "Y0001",
      "description": "Yarn"
    },
    {
      "quantity": 4,
      "amount": 60,
      "taxCode": "PS081282",
      "itemCode": "Y0002",
      "description": "Shirt"
    }
  ]
}'

Response Examples

{
  "shipFrom": {
    "address": "800 South St 640",
    "city": "Waltham",
    "state": "MA",
    "zip": "02453",
    "country": "US"
  },
  "shipTo": {
    "address": "1768 Mirassou Pl",
    "city": "San Jose",
    "state": "CA",
    "zip": "95124-5722",
    "country": "US"
  },
  "currency": "USD",
  "lines": [
    {
      "quantity": 1,
      "amount": 100.0,
      "taxCode": "PS081282",
      "itemCode": "Y0001",
      "description": "Yarn",
      "tax": 9.25
    },
    {
      "quantity": 4,
      "amount": 60.0,
      "taxCode": "PS081282",
      "itemCode": "Y0002",
      "description": "Shirt",
      "tax": 5.55
    }
  ],
  "taxReference": "cf23b118-4adc-4d92-8743-fa140f6c6893",
  "totalTax": 14.8,
  "status": "Saved",
  "used": false,
  "companyId": 899652,
  "requestDate": "Wed Aug 26 00:00:00 IDT 2020",
  "totalAmount": 160.0,
  "totalExempt": 0.0,
  "totalTaxable": 160.0,
  "taxVatType": "TAX"
}

XML Request Content

Send a tax-quote resource, with the following:
     currency     string    required
     lines     container    required (see lines)
     request-date     string    optional
     ship-from     container    optional (see ship-from)
     ship-to     container    required (see ship-to)

XML Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the tax-quote resource (see tax-quote (XML resource)).


XML Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/taxQuote \
-H 'Content-Type: application/xml' \
-H 'Accept: application/xml' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<tax-quote xmlns="http://ws.plimus.com">
  <currency>USD</currency>
  <ship-to>
    <address>1768 Mirassou Place</address>
    <city>San Jose</city>
    <state>CA</state>
    <zip>95124</zip>
    <country>US</country>
  </ship-to>
  <lines>
    <quantity>1</quantity>
    <amount>100</amount>
    <tax-code>PS081282</tax-code>
    <item-code>Y0001</item-code>
    <description>Yarn</description>
  </lines>
</tax-quote>'

Response Examples

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tax-quote xmlns="http://ws.plimus.com">
  <ship-from>
    <address>800 South St 640</address>
    <city>Waltham</city>
    <state>MA</state>
    <zip>02453</zip>
    <country>US</country>
  </ship-from>
  <ship-to>
    <address>1768 Mirassou Pl</address>
    <city>San Jose</city>
    <state>CA</state>
    <zip>95124-5722</zip>
    <country>US</country>
  </ship-to>
  <currency>USD</currency>
  <lines>
    <quantity>1</quantity>
    <amount>100.0</amount>
    <tax-code>PS081282</tax-code>
    <item-code>Y0001</item-code>
    <description>Yarn</description>
    <tax>9.2500</tax>
  </lines>
  <tax-reference>1ef16d7a-34a5-4608-a084-3ee3f2278643</tax-reference>
  <vat-code></vat-code>
  <total-tax>9.2500</total-tax>
  <status>Saved</status>
  <used>false</used>
  <company-id>899652</company-id>
  <request-date>Mon Sep 07 00&#x3a;00&#x3a;00 IDT 2020</request-date>
  <total-amount>100.0</total-amount>
  <total-exempt>0.0</total-exempt>
  <total-taxable>100.0</total-taxable>
  <tax-vat-type>TAX</tax-vat-type>
</tax-quote>
Language
Credentials
:
Click Try It! to start a request and see the response here!