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

Request

Fetch a paginated list of products with optional filters like date, search query, limit, without_pagination and without_one_off.

Security
BearerAuth
Query
datestring(date)

Filter products created on a specific date.

Example: date=2024-12-06
querystring

Search for products by name or description.

Example: query=Christie
limitinteger

Limit the number of results per page.

Default 100
Example: limit=100
without_paginationboolean

Get all products without pagination.

Default false
Example: without_pagination=true
without_one_offboolean

Get all recurring products.

Default false
Example: without_one_off=true
Headers
Acceptstringrequired

The response format must be JSON.

Example: application/json
curl -i -X GET \
  'https://docs.vyafac.com/_mock/openapi/products?date=2024-12-06&query=Christie&limit=100&without_pagination=true&without_one_off=true' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

A list of products retrieved successfully.

Bodyapplication/json
Response
application/json
{ "status": "success", "message": "Products retrieved successfully!", "meta": { "total": 5, "per_page": 100, "current_page": 1, "last_page": 1, "next_page_url": null, "prev_page_url": null }, "data": [ { … }, { … } ], "errors": [], "code": 200, "timestamp": "2025-02-27T11:20:47+00:00", "version": "1.0.0" }

Request

Create a new product with a name, description, and pricing details.

Security
BearerAuth
Headers
Acceptstringrequired

The response format must be JSON.

Example: application/json
Bodyapplication/jsonrequired
curl -i -X POST \
  https://docs.vyafac.com/_mock/openapi/products \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Generic Granite Pizza",
    "description": "https://bradley.net",
    "pricing_option": {
      "default": 1,
      "price": 10,
      "payment_type": "one-off",
      "billing_interval_type": null,
      "billing_frequency": null,
      "tax_plan": {
        "type": "exclusive",
        "amount": 5,
        "amount_type": "flat"
      }
    }
  }'

Responses

Product created successfully.

Bodyapplication/json
Response
application/json
{ "status": "success", "message": "Product created successfully!", "meta": null, "data": { "id": "pro_EsrjpTa0yPenKvOq58wp5WKM", "name": "Generic Granite Pizza", "description": "https://bradley.net", "active": true, "tax_info": null, "created_at": "2025-02-27T11:21:37.000000Z", "updated_at": "2025-02-27T11:21:37.000000Z" }, "errors": [], "code": 200, "timestamp": "2025-02-27T11:21:37+00:00", "version": "1.0.0" }

Request

Update details of a product.

Security
BearerAuth
Path
idstringrequired

Unique identifier of the product.

Example: pro_EsrjpTa0yPenKvOq58wp5WKM
Headers
Acceptstringrequired

The response format must be JSON.

Example: application/json
Bodyapplication/json
curl -i -X PATCH \
  https://docs.vyafac.com/_mock/openapi/products/pro_EsrjpTa0yPenKvOq58wp5WKM \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Updated name",
    "description": "Updated description of the product."
  }'

Responses

Product updated successfully!

Bodyapplication/json
Response
application/json
{ "status": "success", "message": "Product updated successfully!", "meta": null, "data": { "id": "pro_EsrjpTa0yPenKvOq58wp5WKM", "name": "Generic Granite Pizza", "description": "https://bradley.net", "active": true, "tax_info": null, "created_at": "2025-02-27T11:21:37.000000Z", "updated_at": "2025-02-27T11:21:37.000000Z" }, "errors": [], "code": 200, "timestamp": "2025-02-27T12:45:15+00:00", "version": "1.0.0" }

Request

Fetch detailed information about a product using its unique identifier.

Security
BearerAuth
Path
idstringrequired

Unique identifier of the product.

Example: pro_EsrjpTa0yPenKvOq58wp5WKM
Headers
Acceptstringrequired

The response format must be JSON.

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

Responses

Product details retrieved successfully.

Bodyapplication/json
Response
application/json
{ "status": "success", "message": "resources/product.fetch_success", "meta": null, "data": { "id": "pro_EsrjpTa0yPenKvOq58wp5WKM", "name": "Generic Granite Pizza", "description": "https://bradley.net", "active": true, "tax_info": null, "created_at": "2025-02-27T11:21:37.000000Z", "updated_at": "2025-02-27T11:21:37.000000Z" }, "errors": [], "code": 200, "timestamp": "2025-02-27T12:45:15+00:00", "version": "1.0.0" }

Request

Delete a product from the system

Security
BearerAuth
Path
idstringrequired

Unique identifier of the product.

Example: pro_EsrjpTa0yPenKvOq58wp5WKM
Headers
Acceptstringrequired

The response format must be JSON.

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

Responses

Product deleted successfully.

Bodyapplication/json
Response
application/json
{ "status": "success", "message": "The product has been deleted successfully!", "meta": null, "data": null, "errors": [], "code": 200, "timestamp": "2025-02-27T12:45:15+00:00", "version": "1.0.0" }

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