Skip to content

VyaFac API (1.0.0)

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.

Download OpenAPI description
Languages
Servers
Mock server

https://docs.vyafac.com/_mock/openapi/

Products

Manage and retrieve product details, create new products, update existing ones, and remove products from the system.

Operations

PricingOptions

Define and manage pricing options, including discounts, offers, and different pricing tiers for products and services.

Operations

Customers

Manage customer accounts, retrieve customer details, and handle customer-related operations such as creation, updates, and deletions.

Operations

PaymentMethods

Handle the configuration and management of different payment methods, including credit cards, PayPal, and other online payment systems.

Operations

Subscriptions

Manage and retrieve subscription details, create new subscriptions, update existing ones, and handle cancellations or renewals.

Operations

SubscriptionItems

Define and manage items within a subscription, including adding, updating, or removing items linked to an active subscription.

Operations

PaymentLinkItems

Manage specific items associated with payment links, including their details, pricing, and configurations for seamless checkout experiences.

Operations

Calculate Taxes

Endpoints related to calculating and retrieving tax information.

Operations

Request

Retrieve a list of available tax codes, including their names and descriptions. These tax codes can be used to classify products or services for automated tax calculation.

Security
BearerAuth
Headers
Acceptstringrequired

The response format must be JSON.

Example: application/json
curl -i -X GET \
  https://docs.vyafac.com/_mock/openapi/taxes/codes \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

List of available tax codes retrieved successfully.

Bodyapplication/json
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_state field 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, and amount fields.
  • The response returns tax details such as rate, subtotal, tax amount, total amount, and applicable region information.
Security
BearerAuth
Query
tax_account_idnumberrequired

Your Tax Account ID.

Example: tax_account_id=12345
Headers
Acceptstringrequired

The response format must be JSON.

Example: application/json
Bodyapplication/jsonrequired
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"
  }'

Responses

Tax calculated successfully.

Bodyapplication/json
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" }