Overview
This node integrates with the PhonePe Payment API to perform various payment-related operations, specifically focusing on refunding payments in this context. It allows users to initiate a refund for a completed payment by specifying the original transaction ID and the refund amount in Indian Rupees. The node supports both sandbox (test) and production environments, making it useful for testing and live refund processing. Practical applications include automating refund workflows in e-commerce platforms or financial services that use PhonePe as a payment gateway.
Use Case Examples
- A merchant automates refund processing by providing the original transaction ID and refund amount, triggering the refund via PhonePe API.
- A developer tests refund functionality in a sandbox environment before deploying to production.
Properties
| Name | Meaning |
|---|---|
| Original Transaction ID | The merchant transaction ID of the original payment to refund, used to identify the payment to be refunded. |
| Refund Amount (INR) | The amount to refund in Indian Rupees, must be greater than zero. |
| Test Mode (Sandbox) | Boolean flag to determine whether to use the PhonePe sandbox environment for testing or the live production environment. |
Output
JSON
json- The JSON response from the PhonePe API containing details about the refund request status and related information.
Dependencies
- Requires PhonePe API credentials including merchant ID, salt key, and salt index for authentication.
Troubleshooting
- Error if refund amount is less than or equal to zero: Ensure refund amount is a positive number.
- Error if original transaction ID is missing or invalid: Provide a valid merchant transaction ID of the original payment.
- API request failures: Check API credentials, network connectivity, and whether sandbox mode is correctly set.
- Webhook verification failures (if used): Ensure correct base64-encoded payload and X-VERIFY header are provided for signature validation.
Links
- PhonePe Refund API Documentation - Official documentation for PhonePe refund API endpoints and usage guidelines.