Select Page
Methods Documentation
Edit on
Codepen.io

fastspring.builder.taxId(id)

Takes the customer’s GST ID or VAT ID as input, attempts to validate it in conjunction with the customer’s country (detected via geo IP location or set by fastspring.builder.country()). If the ID is validated successfully, it is applied to the session and no VAT or GST will be applied.


x
47
 
1
<!--
2
    DEMO INFO
3
    taxId allows the buyer to pass their VAT exemption ID to FastSpring
4
    and have the VAT removed from their order total.
5
-->
6
<input type="text" name="Tax ID" id="taxId0">
7
8
<button onclick="fastspring.builder.taxId(document.getElementById('taxId0').value);">
9
    Apply Tax Id
10
</button>
11
12
<!--
13
    DEMO EXTRA INFO
14
-->
15
<br /><br />
16
<div>
17
    Tax id number for demo: DE257486969
18
</div>
19
20
<!--
21
    DEMO EFFECTS
22
-->
23
<br /><br />
24
<div>
25
    Order Total: <span data-fsc-order-total></span>
26
</div>
27
28
<div>
29
    Order Tax: <span data-fsc-order-tax></span>
30
</div>
31
32
<!--
33
    DEMO SETUP
34
        - Initialize the Store Builder Library
35
        - Add item in the cart and set order to a country that charges VAT
36
-->
37
<script
38
    id="fsc-api"
39
    src="https://sbl.onfastspring.com/sbl/1.0.2/fastspring-builder.min.js"
40
    type="text/javascript"
41
    data-storefront="fastspringexamples.test.onfastspring.com/popup-fastspringexamples">
42
</script>
43
44
<script type="text/javascript">
45
    fastspring.builder.add('phot-io-main-app')
46
    fastspring.builder.country('de')
47
</script>
1
 
1
1
 
1

Related Topics