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

Request

List all items in a specific subscription.

Security
BearerAuth
Path
subscriptionIdstringrequired

Unique identifier of the subscription

Example: sub_yizmQhbdxLKXnV1Y87S3Y0pp
Headers
Acceptstringrequired

Response format must be json

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

Responses

Subscription items retrieved successfully

Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "Subscription items retrieved successfully", "data": [ { … } ], "code": 200, "timestamp": "2025-02-27T13:20:00+00:00", "version": "1.0.0" }

Request

Create a new item in a specific subscription.

Security
BearerAuth
Path
subscriptionIdstringrequired

Unique identifier of the subscription

Example: sub_yizmQhbdxLKXnV1Y87S3Y0pp
Headers
Acceptstringrequired

Response format must be json

Example: application/json
Bodyapplication/jsonrequired
object
curl -i -X POST \
  https://docs.vyafac.com/_mock/openapi/subscriptions/sub_yizmQhbdxLKXnV1Y87S3Y0pp/items \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "product_id": 1,
    "pricing_option_id": 1,
    "quantity": 2
  }'

Responses

Subscription item created successfully

Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "Subscription item created successfully", "data": { "id": "si-20n2vqQFWMhr4St7", "product_id": 1, "pricing_option_id": 1, "quantity": 2 }, "code": 200, "timestamp": "2025-02-27T13:25:00+00:00", "version": "1.0.0" }

Request

Retrieve details of a specific subscription item.

Security
BearerAuth
Path
subscriptionIdstringrequired

Unique identifier of the subscription

Example: sub_yizmQhbdxLKXnV1Y87S3Y0pp
itemIdstringrequired

Unique identifier of the subscription item

Example: si-20n2vqQFWMhr4St7
Headers
Acceptstringrequired

Response format must be json

Example: application/json
curl -i -X GET \
  https://docs.vyafac.com/_mock/openapi/subscriptions/sub_yizmQhbdxLKXnV1Y87S3Y0pp/items/si-20n2vqQFWMhr4St7 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Subscription item details retrieved successfully

Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "Subscription item details retrieved successfully", "data": { "id": "si-20n2vqQFWMhr4St7", "product_id": 1, "pricing_option_id": 1, "quantity": 2 }, "code": 200, "timestamp": "2025-02-27T13:30:00+00:00", "version": "1.0.0" }

Request

Update an existing subscription item.

Security
BearerAuth
Path
subscriptionIdstringrequired

Unique identifier of the subscription

Example: sub_yizmQhbdxLKXnV1Y87S3Y0pp
itemIdstringrequired

Unique identifier of the subscription item

Example: si-20n2vqQFWMhr4St7
Headers
Acceptstringrequired

Response format must be json

Example: application/json
Bodyapplication/jsonrequired
object
curl -i -X PATCH \
  https://docs.vyafac.com/_mock/openapi/subscriptions/sub_yizmQhbdxLKXnV1Y87S3Y0pp/items/si-20n2vqQFWMhr4St7 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "quantity": 1
  }'

Responses

Subscription item updated successfully

Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "Subscription item updated successfully", "data": { "id": "si-20n2vqQFWMhr4St7", "quantity": 1 }, "code": 200, "timestamp": "2025-02-27T13:35:00+00:00", "version": "1.0.0" }

Request

Delete a subscription item.

Security
BearerAuth
Path
subscriptionIdstringrequired

Unique identifier of the subscription

Example: sub_yizmQhbdxLKXnV1Y87S3Y0pp
itemIdstringrequired

Unique identifier of the subscription item

Example: si-20n2vqQFWMhr4St7
Headers
Acceptstringrequired

Response format must be json

Example: application/json
curl -i -X DELETE \
  https://docs.vyafac.com/_mock/openapi/subscriptions/sub_yizmQhbdxLKXnV1Y87S3Y0pp/items/si-20n2vqQFWMhr4St7 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Subscription item deleted successfully

Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "Subscription item deleted successfully", "data": null, "code": 200, "timestamp": "2025-02-27T13:40:00+00:00", "version": "1.0.0" }

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