Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the PhonePe Payment Gateway API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fphonepe.com%2Fphonepe" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fphonepe.com%2Fphonepe" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with PhonePe Payment Gateway API.
Initiate payment transactions via UPI, credit card, debit card, or net banking in India
Check real-time transaction status by merchant transaction ID
Process full or partial refunds for completed payment transactions
Validate UPI Virtual Payment Addresses before initiating payments
GET STARTED
Track refund status by merchant ID and transaction reference
Support SHA256-based request verification for secure server-to-server communication
Patterns agents use PhonePe Payment Gateway API for, with concrete tasks.
★ E-Commerce Payment Collection in India
Accept payments from Indian customers through UPI, credit cards, debit cards, and net banking via PhonePe's payment gateway. The API handles payment page redirection, transaction processing, and callback notifications. PhonePe processes over 5 billion UPI transactions monthly, making it one of the largest payment processors in India.
Create a payment request for INR 999 via UPI with a merchant transaction ID and redirect the customer to the PhonePe payment page
Transaction Status Verification
Verify payment outcomes programmatically after a customer completes or abandons a payment flow. The status endpoint returns the current state of any transaction by merchant ID and transaction reference, enabling order fulfillment systems to confirm payment before shipping. Supports both synchronous polling and callback-based notification.
Query the transaction status endpoint for merchant ID MERCHANT123 and transaction ID TXN456 to confirm whether the payment succeeded
Refund Processing
Issue refunds for completed transactions when orders are cancelled or returned. PhonePe supports full and partial refunds credited back to the original payment method. The refund status endpoint lets you track whether the refund has been processed and when funds were returned to the customer.
Submit a refund request for INR 499 on transaction TXN456 under merchant MERCHANT123 and verify the refund status
AI Agent Payment Processing via Jentic
AI agents handling Indian e-commerce workflows can initiate payments and check transaction status through Jentic without managing PhonePe credentials directly. The agent searches for UPI payment operations, loads the schema including the SHA256 verification header format, and executes calls with Jentic handling cryptographic signing.
Search Jentic for 'initiate a UPI payment in India', load the PhonePe pay operation schema, and execute a payment request for INR 1500 with a generated merchant transaction ID
6 endpoints — jentic publishes the only available openapi specification for phonepe payment gateway api, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/pg/v1/pay
Initiate a payment transaction via UPI, card, or net banking
/pg/v1/status/{merchantId}/{merchantTransactionId}
Check payment transaction status
/pg/v1/refund
Initiate a refund for a completed transaction
/pg/v1/refund/{merchantId}/{merchantTransactionId}
Check refund status
/v3/transaction/{merchantId}/{transactionId}/status
Legacy transaction status check (v3)
/pg/v1/validate/vpa
Validate a UPI Virtual Payment Address
/pg/v1/pay
Initiate a payment transaction via UPI, card, or net banking
/pg/v1/status/{merchantId}/{merchantTransactionId}
Check payment transaction status
/pg/v1/refund
Initiate a refund for a completed transaction
/pg/v1/refund/{merchantId}/{merchantTransactionId}
Check refund status
/v3/transaction/{merchantId}/{transactionId}/status
Legacy transaction status check (v3)
/pg/v1/validate/vpa
Validate a UPI Virtual Payment Address
What agents get from Jentic-routed access to this vendor.
Setup
Wiring the PhonePe Payment Gateway API by hand means computing its SHA256 X-VERIFY header from the payload, endpoint, and salt key on each request against api.phonepe.com/apis/hermes, and choosing between production and preprod hosts yourself. Through Jentic you install once, import the PhonePe Payment Gateway API from the API Directory, store the salt credentials once, and your agent calls it.
Permission scoping
PhonePe puts the merchant and transaction ids in the URL path (/pg/v1/status/{merchantId}/{merchantTransactionId}, /pg/v1/refund/{merchantId}/{merchantTransactionId}), so a rule can pin your agent to reading status for your merchant; the pay, refund, and VPA validate operations carry their target in the request body, so there you limit the agent to the operations it needs. You choose the operations it may call, so initiating a payment or a refund is not included unless you add it.
Credential isolation
Your PhonePe salt key and salt index are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'check a UPI payment status', and Jentic returns the matching PhonePe operation with its input schema so the agent calls the right endpoint without browsing the reference docs.
Alternatives and complements available in the Jentic catalogue.
Stripe API
Global payment processing with Indian payment method support including UPI
Choose Stripe for international businesses that also accept Indian payments. Choose PhonePe for India-first businesses where UPI market share and local integration depth matter most.
Specific to using PhonePe Payment Gateway API through Jentic.
Why is there no official OpenAPI spec for PhonePe Payment Gateway API?
PhonePe does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call PhonePe Payment Gateway API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.
What authentication does the PhonePe Payment Gateway API use?
PhonePe uses a SHA256-based verification header called X-VERIFY. It is computed as SHA256(base64EncodedPayload + endpoint + saltKey) concatenated with the salt index. Through Jentic, the salt key is stored in your Jentic One instance and the verification header is computed automatically at execution time.
Can I validate a UPI VPA before initiating payment?
Yes. Use POST /pg/v1/validate/vpa to check whether a Virtual Payment Address is valid and active before sending a payment request. This prevents failed transactions due to incorrect or inactive UPI addresses.
What payment methods does the PhonePe API support?
The POST /pg/v1/pay endpoint supports UPI (collect and intent), credit cards, debit cards, and net banking. The payment method is specified in the request payload. UPI is the most common method, handling both same-device and cross-device flows.
How do I check transaction status through Jentic?
Search Jentic for 'check PhonePe payment status' to find the GET /pg/v1/status/{merchantId}/{merchantTransactionId} operation. Load the schema, provide your merchant ID and transaction reference, and execute. Jentic handles the X-VERIFY header computation using your stored salt key.
How long does a PhonePe refund take to process?
Refund processing time depends on the original payment method. UPI refunds typically complete within 1-5 business days. Use GET /pg/v1/refund/{merchantId}/{merchantTransactionId} to track the current refund status programmatically.
Can I limit what my agent is allowed to do with the PhonePe Payment Gateway API?
Yes. Because you run Jentic One yourself, your own rules decide which PhonePe operations and credentials the agent may use. Since the merchant and transaction IDs sit in the URL path for GET /pg/v1/status/{merchantId}/{merchantTransactionId} and GET /pg/v1/refund/{merchantId}/{merchantTransactionId}, you can pin the agent to reading status for your own merchant. The pay, refund, and VPA-validate operations carry their target in the request body, so you grant only the ones the agent needs; initiating a payment or a refund is excluded unless you add it.
Know of an official OpenAPI document? Contribute it →
For Agents
Initiate payments, check transaction status, process refunds, and validate UPI VPA addresses through PhonePe's Indian payment gateway supporting UPI and card payments.
Use for: I need to initiate a UPI payment for a customer in India, I want to check the status of a PhonePe transaction, Process a refund for a failed delivery, Validate a customer's UPI VPA address before payment
Not supported: Does not handle international payments, subscription billing, or payout disbursements - use for Indian domestic payment collection via UPI and cards only.
Jentic publishes the only available OpenAPI specification for PhonePe Payment Gateway API, keeping it validated and agent-ready. PhonePe provides a payment gateway for Indian digital payments supporting UPI, credit cards, debit cards, and net banking. The API covers payment initiation, transaction status checks, refund processing, and VPA (Virtual Payment Address) validation across 6 endpoints designed for merchants integrating PhonePe as a payment method in India.
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.
Base layer of spec validity and structural soundness.
Aggregated quality score from linter diagnostics, weighted by severity.
Percentage of `$ref` references that resolve successfully.
Checks whether the API description parses successfully and conforms to its declared specification (e.g., OpenAPI).
Structural correctness score based on schema issues using logarithmic dampening.
Clarity, completeness, and ingestion readiness for developers and tooling.
How richly the API is illustrated with examples.
Percentage of examples that conform to their schemas.
Percentage of operations with complete response definitions (success, client error, server error).
Health of API ingestion, bundling, and resolution within Jentic pipelines.
Semantic breadth, depth, and agent comprehension for AI systems.
Coverage of descriptions across API elements.
Coverage of RFC 9457 Problem Details for error responses.
Coverage, uniqueness, and casing consistency of operationIds for AI inference.
Coverage of summaries across operations/tags/info.
Functional utility, complexity comfort, and AI orchestration readiness.
Agent comfort level based on API operational and structural complexity.
Trust, risk posture, and security compliance.
Average quality of security schemes based on authentication method strength (weakest link for OAuth2).
Findability, semantic richness, and reasoning readiness.
Clarity and depth of descriptions across API elements.
Score it yourself
Every API in the directory is allowlisted, so you can re-score it with no key required.
npx @jentic/api-scorecard-cli score <openapi-url>