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

Request

List items for a specific payment link.

Security
BearerAuth
Path
linkIdstringrequired

Unique identifier of the payment link

Example: pl_odninxMhEZ0CFSoOLOMfkx6i
Headers
Acceptstringrequired

Response format must be json

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

Responses

Payment link items retrieved successfully

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

Request

Create a new item for a payment link.

Security
BearerAuth
Path
linkIdstringrequired

Unique identifier of the payment link

Example: pl_odninxMhEZ0CFSoOLOMfkx6i
Headers
Acceptstringrequired

Response format must be json

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

Responses

Payment link item created successfully

Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "Payment link item created successfully", "data": { "id": "pli_N9G4rdQYjltUeVyrHWf9Tn2s" }, "code": 200, "timestamp": "2025-02-27T13:00:00+00:00", "version": "1.0.0" }

Request

Retrieve details of a payment link item.

Security
BearerAuth
Path
linkIdstringrequired

Unique identifier of the payment link

Example: pl_odninxMhEZ0CFSoOLOMfkx6i
itemIdstringrequired

Unique identifier of the payment link item

Example: pli_N9G4rdQYjltUeVyrHWf9Tn2s
Headers
Acceptstringrequired

Response format must be json

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

Responses

Payment link item details retrieved successfully

Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "Payment link item details retrieved successfully", "data": { "id": "pli_N9G4rdQYjltUeVyrHWf9Tn2s", "product_id": "pro_mUMe9iAzjoEm5GgArWL3lIG0" }, "code": 200, "timestamp": "2025-02-27T13:05:00+00:00", "version": "1.0.0" }

Request

Update an existing payment link item.

Security
BearerAuth
Path
linkIdstringrequired

Unique identifier of the payment link

Example: pl_odninxMhEZ0CFSoOLOMfkx6i
itemIdstringrequired

Unique identifier of the payment link item

Example: pli_N9G4rdQYjltUeVyrHWf9Tn2s
Headers
Acceptstringrequired

Response format must be json

Example: application/json
Bodyapplication/jsonrequired
object
curl -i -X PATCH \
  https://docs.vyafac.com/_mock/openapi/payment-links/pl_odninxMhEZ0CFSoOLOMfkx6i/items/pli_N9G4rdQYjltUeVyrHWf9Tn2s \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "quantity": 3
  }'

Responses

Payment link item updated successfully

Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "Payment link item updated successfully", "data": { "id": "pli_N9G4rdQYjltUeVyrHWf9Tn2s", "quantity": 3 }, "code": 200, "timestamp": "2025-02-27T13:10:00+00:00", "version": "1.0.0" }

Request

Delete a payment link item.

Security
BearerAuth
Path
linkIdstringrequired

Unique identifier of the payment link

Example: pl_odninxMhEZ0CFSoOLOMfkx6i
itemIdstringrequired

Unique identifier of the payment link item

Example: pli_N9G4rdQYjltUeVyrHWf9Tn2s
Headers
Acceptstringrequired

Response format must be json

Example: application/json
curl -i -X DELETE \
  https://docs.vyafac.com/_mock/openapi/payment-links/pl_odninxMhEZ0CFSoOLOMfkx6i/items/pli_N9G4rdQYjltUeVyrHWf9Tn2s \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Payment link item deleted successfully

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

Calculate Taxes

Endpoints related to calculating and retrieving tax information.

Operations