All Collections
Integration
Instant Payment Notifications (IPN) Integration Guide
Instant Payment Notifications (IPN) Integration Guide
V
Written by Vincent UniPayment
Updated over a week ago

Overview

Instant Payment Notifications (IPNs) are automated messages sent from our payment gateway to the notify_url specified by merchants during invoice or withdrawal request creation. These notifications are crucial for merchants to track and respond to the changes in the status of their transactions.

IPNs are triggered in two scenarios:

  1. Invoice IPNs: When the status of an invoice changes to 'paid', 'confirmed', or 'complete'.

  2. Withdrawal IPNs: Sent when there is a change in the status of a withdrawal request.

Developers should note that IPNs are generated and sent whenever there is a status change in either an invoice or a withdrawal. This feature ensures real-time updates and seamless tracking of transaction statuses, facilitating efficient and automated payment processing.

Status Process and Field Definitions

Each IPN type has a specific set of statuses and fields.

Debugging IPNs

To facilitate easy debugging of IPNs, you can use the webhook testing platform provided.

This site allows real-time monitoring of IPN content, enabling developers to verify and adjust their integration as needed.

  1. Set Up NotifyURL: When creating an invoice or a withdrawal request, set the notify_url to the URL provided by the webhook test site.
    ​
    ​If you are creating an invoice using the API, please specify the 'notify_url' as the URL provided by the webhook, because the 'notify_url' in the PaymentApp will be overridden by the parameters provided by 'create_invoice'.
    ​

  2. Perform Transaction: Execute a transaction that triggers an IPN.

  3. Monitor IPN: Check the webhook site for the IPN message. You can view the payload and headers of the received IPN.

  4. Analyze and Debug: Use the details provided by the webhook site to analyze the IPN structure and content. Debug your system based on this information.

IPN Verification

Verify the authenticity of each IPN received to ensure security and data integrity.

Steps for Verification:

  1. Receive and Extract IPN: On receiving an IPN, collect the IPN message and its parameters.

  2. Submit for Verification: Use the IPN Verification page at IPN Verification to validate the IPN.

  3. Check the code Field:

    • OK indicates a valid IPN.

    • IPN_INVALID signifies an invalid IPN.

    IPN Verify API

Actions:

  • Valid IPNs: Process these as normal.

  • Invalid IPNs: Do not process. Log for audit purposes.

Verification ensures the IPNs are legitimate, maintaining the reliability of your automated systems.

Did this answer your question?