canonical: https://jentic.com/apis/vnpay.vn/vnpay-vn

# Vnpay Vn VNPAY Payment Gateway API

VNPAY payment gateway API for processing online payments in Vietnam. Supports payment initiation, refunds, and transaction queries. The API exposes 2 endpoints secured with apiKey authentication.

## For AI agents

Programmatically create a payment, query transaction or process refund. Covers 2 operations with apiKey authentication.

## Scope

Does not handle communications, crm, or developer tools - use for payments only.

## Capabilities

- Create a payment
- Query transaction or process refund
- Integrate VNPAY Payment Gateway API into automated workflows
- Query and filter VNPAY Payment Gateway API records by parameters
- Monitor VNPAY Payment Gateway API operational status and events

## Use cases

### Payments Operations

Use the VNPAY Payment Gateway API to perform payments operations programmatically. The API provides 2 endpoints covering core functionality including create a payment, query transaction or process refund.

Example prompt: Call POST `/paymentv2/vpcpay.html` to create a payment

### Data Retrieval and Monitoring

Query VNPAY Payment Gateway API resources on a schedule to track changes, generate alerts, or feed downstream dashboards. Agents poll relevant endpoints, compare against previous state, and trigger actions when thresholds are crossed.

Example prompt: Poll the primary VNPAY Payment Gateway API endpoint, compare response to last known state, and alert if changed

### AI Agent Integration via Jentic

AI agents discover and call VNPAY Payment Gateway API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle apiKey tokens manually.

Example prompt: Search Jentic for 'create a payment', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/paymentv2/vpcpay.html` | Create a payment |
| POST | `/merchant_webapi/merchant.html` | Query transaction or process refund |

## Key resources

- **Merchant_Webapi** — Operations for merchant_webapi
- **Paymentv2** — Operations for paymentv2

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 47 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 94 / 100
  - Developer Experience & Jentic Compatibility: 59 / 100
  - AI-Readiness & Agent Experience: 46 / 100
  - Agent Usability: 94 / 100
  - Security: 15 / 100
  - AI Discoverability: 100 / 100
- **View full report:** https://jentic.com/apis/vnpay.vn/vnpay-vn/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring VNPAY by hand means computing the HMAC SHA512 checksum for every request, choosing the sandbox or production pay host, and passing the secure hash in the query yourself. Through Jentic you install once, import VNPAY Payment Gateway from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** VNPAY carries its transaction data in the request rather than the URL path, so limit the agent to the operations it needs, such as the payment creation call. You choose the allowed set, so the merchant web API operation is not included unless you add it.
- **Credential handling:** Your VNPAY credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a payment', and Jentic returns the matching VNPAY operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Stripe** — Alternative payments API
- **Adyen** — Alternative payments API
- **Square** — Complementary payments API
- **Paypal** — Complementary payments API

## FAQ

### What authentication does the VNPAY Payment Gateway API use?

The VNPAY Payment Gateway API uses an API key passed in the `vnp_SecureHash` query. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I create a payment with the VNPAY Payment Gateway API?

Yes. Use the POST `/paymentv2/vpcpay.html` endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the VNPAY Payment Gateway API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I create a payment through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'create a payment'. Jentic returns the matching VNPAY Payment Gateway API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the VNPAY Payment Gateway API have?

The VNPAY Payment Gateway API exposes 2 endpoints covering merchant_webapi, paymentv2 operations.

### Can I limit what my agent is allowed to do with the VNPAY Payment Gateway API?

Yes. Because you run Jentic One yourself, your own rules decide which VNPAY operations and credentials the agent may use, and you pick the allowed set. The API exposes two operations: payment creation at POST `/paymentv2/vpcpay.html` and the merchant web API at POST `/merchant_webapi/merchant.html` for querying transactions or processing refunds. You can grant the agent only the payment creation call and leave the merchant web API operation out unless you explicitly add it.
