# Fact Pattern 7.2 - Dial tone phone service sold to a customer in Delhi, India

Source: https://developer.avalara.com/products/communications/integration-guides/communications-integration/cfq3740929166360/

Guide: Communications

# Fact Pattern 7.2 - Dial tone phone service sold to a customer in Delhi, India

This example demonstrates how to handle dial-tone phone service sales in Delhi, India, using an alternative T/S type and country-only PCode.

This example describes a dial-tone phone service sold to a customer in Delhi, India. It demonstrates using an alternative T/S type for the same product when selling outside of North America and that the user can adjust to using a country-only PCode. Verify that the currency code is properly set.

**Request parameters**:

-   Customer type is `0` (Residential)
-   Bill-to PCode is `5125400`
-   Currency code is `INR`
-   Item 1
    -   Sale type is `1` (Retail)
    -   T/S pair is `15/657`, (Telephony/Service - India Intrastate Supply)
    -   Amount charged is `25` (in this case, Indian rupees)

## Request

**View example**:

```
curl --location --request POST 'https://communicationsua.avalara.net/api/v2/afc/CalcTaxes' \
--header 'Content-Type: application/json' \
--header 'client_id: 787' \
--header 'Authorization: Basic {Base64-encoded credentials}' \
--data-raw '{
    "cfg": {"incrf": true //--Return Reporting Information.
    },
    "cmpn": {"bscl": 1, //--Business Class: Typical value is "1". Is the provider and an Incumbant Local Exchange Carrier ("ILEC",  basically those companies that own the wire, antennas and switches of a network) or not?   0=ILEC, 1=NOT an ILEC (or Competitive Local Exchange Carrier "CLEC")"svcl": 0, //--Service Class:  Is the provider Primarily a local service provider, or long distance?   0=Primary Local; 1=Primary Long Distance. "fclt": true, //--Facilities:  Does the company providing the service have facilities to provide the service?   "frch": false, //--Franchise:  Indicates if the company provides services sold pursuant to a franchise agreement between the carrier and jurisdiction."reg": false, //--Regulated:  Is the Seller is regulated?"idnt": "CertCompany"
    },
    "inv": [{    "doc": "CertTest7_2_PCD_International856e6214-2d4e-4cdd-ac65-6382efd6cd37", //--Document Code:  Required.  A unique value that is used to Commit transactions through the Commit API. Do NOT use InvoiceNumber.  GUID preferable. Every unique call must have a unique "doc".    "cmmt": false, //--Commit:  Required.  The status of transaction for end of period compliance reporting.  Previously CalcTaxes uncommitted transactions can be committed through the Commit API.    "bill": { //--Bill To Object:  Required.  Field usually originating from a customer account profile. The SoldTo address of the transaction.  AFC will return the level of granularity in taxation based on the granularity of the address provided.  This object can be JUST PCode value if you utilize the GEO or PCODE APIs for assigning a PCODE to a location.
"pcd": 5148434  //--PCode:  You can pass only this value in the BillTo object.  Preassigned values are handled via the GEO and PCODE APIs.
},    "cust": 0, //--Customer Type: Required.  Field usually originating from a customer account profile. 0=Residential; 1=Business; 2=Senior Citizen; 3=Industrial.  Different customer types could have different tax rules.    "lfln": false, //--Lifeline:  Field usually originating from a customer account profile.  Is the customer a lifeline participants?    "date": "2022-04-13", //--Date:  Effective Tax Rate Date to be applied to the invoice.  Most often Invoice Date generated through SysDate on the bill run.    "itms": [
{
    "ref": "1_CertTest7_2_PCD_International", //--Reference Code.  Reference Id for a line item."chg": 25, //--Charge:  Required.  Billed pre-tax amount if "incl"=false.  Billed after tax amount if "incl"=true.
      "sale": 1, //--Sale:  Sale Type:  0=Wholesale, 1=Retail, 2=Consumed (Sales and Use Only), 3=Vendor Use. REQUIRED
    "tran": 15, //--Transaction Type: Industry vertical...see mapping guidelines for this. REQUIRED
    "serv": 657, //--Service Type:  Billable services for an industry vertical....see mapping guidelines for this. REQUIRED
    "adj": false //--Adjustment:  True, will negate taxes. False, will return positive taxes.  Default is False.
}    ],    "invm": true,    "dtl": true,    "summ": true,    "acct": "CertCompany",    "custref": "CertTest7_2",    "invn": "CertTest7_2",    "bcyc": "202204",    "bpd": { //--Billing Period Object: Used for reporting.
"month": "04",
"year": "2022"    },    "ccycd": "INR" //--Currency Code:  ISO currency code value.  Can be used for reporting.}
    ]
}'
```

## Response

**View example**:

```
{
    "inv": [{    "doc": "CertTest7_2_PCD_Internationald2f6f235-8c4e-4fdb-9138-ef3ddcad1f30",    "itms": [
{
    "ref": "1_CertTest7_2_PCD_International",
    "txs": [{    "bill": true,    "cmpl": true,    "tm": 25.0,    "calc": 1,    "cat": "SALES AND USE TAXES",    "cid": 1,    "name": "SGST (Communications)",    "exm": 0.0,    "lns": 0,    "min": 0.0,    "pcd": 5148434,    "rate": 0.09,    "sur": false,    "tax": 2.25,    "lvl": 1,    "tid": 486},{    "bill": true,    "cmpl": true,    "tm": 25.0,    "calc": 1,    "cat": "SALES AND USE TAXES",    "cid": 1,    "name": "CGST (Communications)",    "exm": 0.0,    "lns": 0,    "min": 0.0,    "pcd": 5148400,    "rate": 0.09,    "sur": false,    "tax": 2.25,    "lvl": 0,    "tid": 484}
    ]
}    ],    "summ": [
{
    "max": 2147483647.0,
    "min": 0.0,
    "tchg": 25.0,
    "calc": 1,
    "cat": "SALES AND USE TAXES",
    "cid": 1,
    "name": "SGST (Communications)",
    "exm": 0.0,
    "lns": 0,
    "pcd": 5148434,
    "rate": 0.09,
    "sur": false,
    "tax": 2.25,
    "lvl": 1,
    "tid": 486
},
{
    "max": 2147483647.0,
    "min": 0.0,
    "tchg": 25.0,
    "calc": 1,
    "cat": "SALES AND USE TAXES",
    "cid": 1,
    "name": "CGST (Communications)",
    "exm": 0.0,
    "lns": 0,
    "pcd": 5148400,
    "rate": 0.09,
    "sur": false,
    "tax": 2.25,
    "lvl": 0,
    "tid": 484
}    ],    "incrf": {
"acct": "CertCompany",
"custref": "CertTest7_2",
"invn": "CertTest7_2",
"bcyc": "202204",
"ccycd": "INR",
"ccydesc": "Indian Rupee"    }}
    ]
}
```