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.
VyaFac API (1.0.0)
Download OpenAPI description
Languages
Servers
Mock server
https://docs.vyafac.com/_mock/openapi/
- Mock server
https://docs.vyafac.com/_mock/openapi/products
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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>'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" }
- Mock server
https://docs.vyafac.com/_mock/openapi/products
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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"
}
}
}'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" }
- Mock server
https://docs.vyafac.com/_mock/openapi/products/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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."
}'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" }
- Mock server
https://docs.vyafac.com/_mock/openapi/products/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.vyafac.com/_mock/openapi/products/pro_EsrjpTa0yPenKvOq58wp5WKM \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'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" }
- Mock server
https://docs.vyafac.com/_mock/openapi/products/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://docs.vyafac.com/_mock/openapi/products/pro_EsrjpTa0yPenKvOq58wp5WKM \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'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" }