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.
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://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | 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
GET STARTED
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.
Validate UPI Virtual Payment Addresses before initiating payments
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)
Three things that make agents converge on Jentic-routed access.
Credential isolation
PhonePe salt key and merchant credentials are stored encrypted in the Jentic MAXsystem vault. The X-VERIFY header is computed server-side at execution time — agents never see the raw salt key or have to implement SHA256 signing logic.
Intent-based discovery
Agents search by intent (e.g., 'initiate a UPI payment in India') and Jentic returns matching PhonePe operations with input schemas including the payload structure for different payment methods.
Time to first call
Direct PhonePe integration: 3-5 days for SHA256 signing implementation, callback handling, and payment method configuration. Through Jentic: under 1 hour — search, load schema, execute with automatic header signing.
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 at https://app.jentic.com/sign-up.
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 the MAXsystem vault 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.
/pg/v1/validate/vpa
Validate a UPI Virtual Payment Address