Vertex Tax Provider Fields
Current Scenario:
Tax providers connected via SPI can incorporate custom fields for customers and products. For instance, Vertex enables the configuration of customer codes, product classes, and more, influencing tax calculations based on these values. Our system accommodates the inclusion of these values during CRUD operations for customers and items, including plans and addons, through APIs. While configuration is also feasible through the Leap UI, we've deliberately chosen not to support these fields within the classic UI.
Problem Statement:
When a merchant transitions from PC 1.0 to Leap UI, the plans and addon pages remain in the classic UI. Consequently, the merchant is unable to access the product-related fields for that tax provider within the UI
This issue is not observed for customer-related fields, as customer-related pages are visible in the Leap UI for P C1.0.
Solution:
This necessarily is not a blocker, and can be handled by doing one of the following:
Merchants can migrate to PC2 DIFFICULTREQUIRES DEVELOPMENT EFFORT
Merchants can use APIs to add/update product identifiers for the tax providerEASY
Â
Using APIs to add/update product identifiers:
We can use tax_providers_fields
in our Plans/Addons APIs to configure vertex fields.
Sample PC 1.0 curl command to create plans with vertex product identifiers:
curl https://{site}.chargebee.com/api/v2/plans \
-u {site_api_key}:\
-d id="silver" \
-d name="Silver" \
-d invoice_name="sample plan" \
-d price=5000 \
-d taxable=true \
-d tax_providers_fields[provider_name][0]="vertex" \
-d tax_providers_fields[field_id][0]="productCode" \
-d tax_providers_fields[field_value][0]="GOODS" \
-d tax_providers_fields[provider_name][1]="vertex" \
-d tax_providers_fields[field_id][1]="productClass" \
Â
Sample request to create a customer with tax provider fields.
curl https://{site}.chargebee.com/api/v2/customers \
-u {site_api_key}:\
-d first_name="John" \
-d last_name="Doe" \
-d email="john@test.com" \
-d locale="fr-CA" \
-d billing_address[first_name]="John" \
-d billing_address[last_name]="Doe" \
-d billing_address[line1]="PO Box 9999" \
-d billing_address[city]="Walnut" \
-d billing_address[state]="California" \
-d billing_address[zip]="91789" \
-d billing_address[country]="US" \
-d 'tax_providers_fields[provider_name][0]'='vertex' \
-d 'tax_providers_fields[field_id][0]'='customerCode' \
-d 'tax_providers_fields[field_value][0]'='EXEMPT'
Â
Sample request to fetch an estimate for a subscription with tax provider fields
curl https://{site}.chargebee.com/api/v2/estimates/create_subscription \
-u {site_api_key}:\
-d 'subscription[plan_id]'='basic' \
-d 'billing_address[line1]'='PO Box 9999' \
-d 'billing_address[city]'='Walnut' \
-d 'billing_address[zip]'='11001' \
-d 'billing_address[country]'='US' \
-d 'tax_providers_fields[provider_name][0]'='vertex' \
-d 'tax_providers_fields[field_id][0]'='vertex_customer_exempt_code' \
-d 'tax_providers_fields[field_value][0]'='GOODS' \
Vertex product and customer identifier field map
Tax Provider Name( | Possible values for | APIs | Possible values for | Remarks |
---|---|---|---|---|
Vertex( |
| All APIs having Plan, Addons and Item Prices(PC2) attributes. | Â Â Merchant to configure it on Vertex Platform | Â Â We share the field id and field value with the mentioned tax provider. |
| ||||
| All APIs involving customer attributes. Also includes APIs where we are creating new customers. Eg: estimate, subscription, hosted pages. Â | |||
|