VyaFac is a powerful and secure payment gateway API designed to streamline transaction processing. Developers can leverage OpenAPI specifications to manage products, pricing options with tax plans, and customer accounts along with their payment methods. The API also enables the creation and management of subscriptions and payment links, providing a seamless and efficient payment experience.
VyaFac API (1.0.0)
Download OpenAPI description
Languages
Servers
Mock server
https://docs.vyafac.com/_mock/openapi/
- Mock server
https://docs.vyafac.com/_mock/openapi/taxes/codes
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.vyafac.com/_mock/openapi/taxes/codes \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Response
application/json
{ "status": "success", "message": "Operation successful.", "meta": null, "data": [ { … }, { … } ], "errors": null, "code": 200, "timestamp": "2025-10-10T07:31:03+00:00", "version": "1.0.0" }
Request
Calculate tax based on the provided location, product details, and amount.
Note:
- The
to_statefield is required for validating the postal code. - The tax is calculated using the provided
to_country,to_postal_code,to_state,to_city,tax_code,product_type, andamountfields. - The response returns tax details such as rate, subtotal, tax amount, total amount, and applicable region information.
Security
BearerAuth
- Mock server
https://docs.vyafac.com/_mock/openapi/taxes/calculate
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://docs.vyafac.com/_mock/openapi/taxes/calculate?tax_account_id=12345' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"to_country": "US",
"to_postal_code": "15006",
"to_state": "PA",
"to_city": "Bairdford",
"tax_code": "standard",
"product_type": "service",
"amount": "199.99"
}'Response
application/json
{ "status": "success", "message": "Success", "meta": null, "data": { "city": null, "country": "US", "county": null, "currency": "USD", "name": "Sales tax", "notes": null, "notice": "Only state tax rates are returned in test mode. Local tax rates will be returned only in live mode except for the following test zip codes: 90049,10128,60611,33132,33206.", "product_type": "service", "rate": 6, "region": "PA", "tax_behavior": "exclusive", "tax_code": "standard", "taxable_part": 100, "import": false, "subtotal": 199.99, "tax_amount": 12, "total_amount": 211.99, "status": "taxable" }, "errors": null, "code": 200, "timestamp": "2025-10-10T07:14:52+00:00", "version": "1.0.0" }