Skip to main content

India - About Physical Goods

For merchants classified under the Online Retail (physical goods) vertical in India, a 6 to 8 digit HSN Code (Harmonized System of Nomenclature — a global standard used to classify traded goods) must be included in the items array of every one-time payment request.

This requirement applies to all one-time payment types supported in India, including UPI (QR Code, Collect, Intent) and credit/debit cards. It does not apply to recurring card payments (Card on File enrollments).

This guide covers the required parameter, validation rules, and sample requests for including HSN codes in your integration.

Note
  • Please review the Indian Government's Foreign Trade Policy and do not trade in any restricted goods.
  • For the latest information on HSN codes, please refer to the Indian GST Department's website.

Parameter

ParameterRequirementDescription
payment.items[].hsn_codeMandatoryHSN code for each distinct item in the transaction. Must be a 6 to 8 digit numeric code. Codes with fewer than 6 or more than 8 digits are rejected.
Info

The HSN code parameter applies to both the Direct API (/ws/direct) and the Payment Page (/ws/request) endpoints. For the Payment Page, use items[].hsn_code at the top level of the request body.


Points to Consider

DOsDON'Ts
Only send 6, 7, or 8 digit HSN codesDon't send 2 or 4 digit HSN codes
Send a distinct HSN code for each category of good in the transactionDon't send a single HSN code for different categories of goods
Send one HSN code if the category of good is the same and only quantity variesDon't send HSN codes restricted for trade by the Indian Government
Don't send blank or empty HSN codes

Applicable payment types

HSN codes are required for all one-time payment types available in India:

Payment typepayment_type_codeHSN required
UPI QR Codeupi-qrcodeYes
UPI Collectupi-collectYes
UPI Intentupi-intentYes
Credit CardcreditcardYes
Debit CarddebitcardYes
Payment Page (all methods)_allYes
Warning

HSN codes are not required for recurring card payments (Card on File enrollments). They apply only to one-time transactions.


Sample requests

Direct API (/ws/direct)

The following example shows how to include HSN codes in a Direct API credit card payment request for India.

curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "{{integration_key}}",
"payment": {
"name": "John Doe",
"email": "john.doe@example.com",
"document": "{{tax_id}}",
"phone_number": "5555555555",
"address": "123 Main Street",
"street_number": "100",
"city": "Capital City",
"state": "State Name",
"zipcode": "00000",
"country": "in",
"payment_type_code": "creditcard",
"merchant_payment_code": "{{unique_merchant_code}}",
"currency_code": "INR",
"amount_total": 99.85,
"card": {
"card_number": "4111111111111111",
"card_name": "John Doe",
"card_due_date": "{{MM/YYYY}}",
"card_cvv": "123"
},
"items": [
{
"hsn_code": "61091000"
},
{
"hsn_code": "84713000"
}
]
}
}'

Payment Page (/ws/request)

The following example shows how to include HSN codes in a Payment Page request for India.

curl -X POST \
--location 'https://sandbox.ebanx.com/ws/request' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "{{integration_key}}",
"name": "John Doe",
"email": "john.doe@example.com",
"country": "in",
"payment_type_code": "_all",
"merchant_payment_code": "{{unique_merchant_code}}",
"currency_code": "INR",
"amount": 1000,
"items": [
{
"hsn_code": "61091000"
},
{
"hsn_code": "84713000"
}
]
}'

Response

No change to the response. It remains as per the standard response format for the respective API endpoint.


Error handling

If the HSN code validation fails, the API returns error code BP-DR-191 with a descriptive message. Common error scenarios:

ScenarioError message
No items array in requestpayment items is required
Missing hsn_code in an itemhsn_code is required for each item
Code shorter than 6 or longer than 8 digitshsn_code must be between 6 and 8 characters
Code contains non-numeric charactershsn_code must contain only digits

Other verticals

For other supported merchant verticals (Digital Goods, SaaS, Gaming), no HSN code is required.

Still need help?

Help Image

We hope this article was helpful. If you still have questions, you can explore the following options: