PhonePe icon

PhonePe

Consume PhonePe Payment API

Overview

This node integrates with the PhonePe Payment API to perform various payment-related operations such as creating payment links, checking payment status, initiating refunds, and verifying webhook authenticity. It is useful for businesses and developers who want to automate and manage PhonePe payment workflows within their applications or automation platforms. For example, a merchant can generate a payment link for a customer, check the status of a payment transaction, process refunds, or verify webhook callbacks from PhonePe to ensure secure communication.

Use Case Examples

  1. Creating a payment link to send to a customer for payment collection.
  2. Checking the status of a payment transaction using the merchant transaction ID.
  3. Initiating a refund for a completed payment transaction.
  4. Verifying the authenticity of a webhook callback from PhonePe to ensure it is not tampered with.

Properties

Name Meaning
Merchant Transaction ID Unique ID for the transaction, used to identify and track payment transactions (alphanumeric, max 35 characters). Required for creating payment links and checking payment status.
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 for the requested operation, which varies depending on the operation performed (e.g., payment link creation response, payment status details, refund response, webhook verification result).

Dependencies

  • Requires PhonePe API credentials including merchant ID, salt key, and salt index for authentication.

Troubleshooting

  • Ensure the Merchant Transaction ID is alphanumeric and does not exceed 35 characters to avoid validation errors.
  • Amount values must be greater than zero when creating payment links or processing refunds; otherwise, an error is thrown.
  • Verify that the correct environment (sandbox or production) is selected to avoid connection issues.
  • Webhook verification may fail if the X-VERIFY header or payload is incorrect or tampered with; ensure the webhook payload is base64-encoded and headers are correctly passed.
  • Common error messages include invalid transaction ID format, amount must be greater than zero, and webhook signature invalid. These can be resolved by correcting input values and ensuring proper API credentials are used.

Links

Discussion