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

Request

List pricing options for a specific product.

Security
BearerAuth
Path
productIdstringrequired

Unique identifier of the product

Example: pro_1xUyaVQeGpQY0pyFHzXJxpZo
Query
limitinteger

Limit the number of results

Example: limit=50
Headers
Acceptstringrequired

Response format must be JSON

Example: application/json
curl -i -X GET \
  'https://docs.vyafac.com/_mock/openapi/products/pro_1xUyaVQeGpQY0pyFHzXJxpZo/pricing-options?limit=50' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

List pricing options retrieved successfully

Bodyapplication/json
Response
application/json
{ "status": "success", "message": "List pricing options retrieved successfully", "data": [ { … } ], "code": 200, "timestamp": "2025-02-27T12:00:00+00:00", "version": "1.0.0" }

Request

Create a pricing option for a product.

Security
BearerAuth
Path
productIdstringrequired

Unique identifier of the product

Example: pro_1xUyaVQeGpQY0pyFHzXJxpZo
Headers
Acceptstringrequired

Response format must be JSON

Example: application/json
Bodyapplication/jsonrequired
curl -i -X POST \
  https://docs.vyafac.com/_mock/openapi/products/pro_1xUyaVQeGpQY0pyFHzXJxpZo/pricing-options \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "default": 1,
    "price": 15.7,
    "payment_type": "recurring",
    "billing_frequency": 1,
    "billing_interval_type": "months"
  }'

Responses

Pricing option created successfully

Bodyapplication/json
Response
application/json
{ "status": "success", "message": "Pricing option created successfully", "data": { "id": "price_nT5EUArglpqiY8D7TVyeWNmi", "default": 1, "price": 15.7, "payment_type": "recurring", "billing_frequency": 1, "billing_interval_type": "months" }, "code": 200, "timestamp": "2025-02-27T12:05:00+00:00", "version": "1.0.0" }

Request

Retrieve details of a pricing option.

Security
BearerAuth
Path
productIdstringrequired

Unique identifier of the pricing option

Example: pro_1xUyaVQeGpQY0pyFHzXJxpZo
pricingOptionIdstringrequired

Unique identifier of the pricing option

Example: price_1xUyaVQeGpQY0pyFHzXJxpZo
Headers
Acceptstringrequired

Response format must be JSON

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

Responses

Pricing option details retrieved successfully

Bodyapplication/json
Response
application/json
{ "status": "success", "message": "Pricing option details retrieved successfully", "data": { "id": "price_nT5EUArglpqiY8D7TVyeWNmi", "default": true, "price": 15.7, "payment_type": "recurring", "billing_frequency": 1, "billing_interval_type": "months" }, "code": 200, "timestamp": "2025-02-27T12:10:00+00:00", "version": "1.0.0" }

Request

Update an existing pricing option.

Security
BearerAuth
Path
productIdstringrequired

Unique identifier of the pricing option

Example: pro_1xUyaVQeGpQY0pyFHzXJxpZo
pricingOptionIdstringrequired

Unique identifier of the pricing option

Example: price_1xUyaVQeGpQY0pyFHzXJxpZo
Headers
Acceptstringrequired

Response format must be JSON

Example: application/json
Bodyapplication/jsonrequired
curl -i -X PUT \
  https://docs.vyafac.com/_mock/openapi/products/pro_1xUyaVQeGpQY0pyFHzXJxpZo/pricing-options/price_1xUyaVQeGpQY0pyFHzXJxpZo \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "default": 1,
    "price": 10.5,
    "payment_type": "recurring",
    "billing_frequency": 3,
    "billing_interval_type": "years"
  }'

Responses

Pricing option updated successfully

Bodyapplication/json
Response
application/json
{ "status": "success", "message": "Pricing option updated successfully", "data": { "id": "price_nT5EUArglpqiY8D7TVyeWNmi", "default": 1, "price": 10.5, "payment_type": "recurring", "billing_frequency": 3, "billing_interval_type": "years" }, "code": 200, "timestamp": "2025-02-27T12:15:00+00:00", "version": "1.0.0" }

Request

Delete a pricing option.

Security
BearerAuth
Path
productIdstringrequired

Unique identifier of the pricing option

Example: pro_1xUyaVQeGpQY0pyFHzXJxpZo
pricingOptionIdstringrequired

Unique identifier of the pricing option

Example: price_1xUyaVQeGpQY0pyFHzXJxpZo
Headers
Acceptstringrequired

Response format must be JSON

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

Responses

Pricing option deleted successfully

Bodyapplication/json
Response
application/json
{ "status": "success", "message": "Pricing option deleted successfully", "data": null, "code": 200, "timestamp": "2025-02-27T12:20:00+00:00", "version": "1.0.0" }

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