Introduction

PayPal IPN for WordPress provides a number of hooks so that you can automate tasks within your own plugins/themes based on the type of IPN that was sent or the payment status of a transaction. This allows you to easily extend the plugin to suit your needs.

Note

Don’t forget to check out our developer guide if you need some guidance on building your own hook functions.

PayPal IPN WordPress Hooks Library

Most of the hooks provided by the plugin will be based on the txn_type or payment_status value sent in the IPN and will always be all lowercase. The following list includes all of the hooks that are currently available.

Catch-All Hook

paypal_ipn_for_wordpress_ipn_response_handler

This is a “catch-all” hook that is triggered with all IPN transactions regardless of the type or payment status.

Verification Hooks

paypal_ipn_for_wordpress_ipn_response_verified

The IPN being processed has been successfully verified by PayPal.

NOTE:  You can also check the status of the IPN from within any other hook function using $posted[‘IPN_status’].

paypal_ipn_for_wordpress_ipn_response_invalid

The IPN being processed failed verification with PayPal and is considered invalid.

NOTE:  You can also check the status of the IPN from within any other hook function using $posted[‘IPN_status’].

Transaction Type Hooks

paypal_ipn_for_wordpress_txn_type_adjustment

A dispute has been resolved and closed.

paypal_ipn_for_wordpress_txn_type_cart

Payment received for multiple items; source is Express Checkout or the PayPal Shopping Cart.

paypal_ipn_for_wordpress_txn_type_express_checkout

Payment received for a single item; source is Express Checkout.

paypal_ipn_for_wordpress_txn_type_masspay

Payment sent using MassPay.

paypal_ipn_for_wordpress_txn_type_merch_pmt

Monthly subscription paid for Website Payments Pro.

paypal_ipn_for_wordpress_txn_type_mp_cancel

Billing agreement cancelled.

paypal_ipn_for_wordpress_txn_type_mp_signup

Created a new billing agreement.

paypal_ipn_for_wordpress_txn_type_new_case

A new dispute was filed.

paypal_ipn_for_wordpress_txn_type_payout

A payout related to a global shipping transaction was completed.

paypal_ipn_for_wordpress_txn_type_pro_hosted

Payment received; source is Website Payments Pro Hosted Solution.

paypal_ipn_for_wordpress_txn_type_recurring_payment

Recurring payment received.

paypal_ipn_for_wordpress_txn_type_recurring_payment_expired

Recurring payment expired.

paypal_ipn_for_wordpress_txn_type_recurring_payment_failed

Recurring payment failed.

paypal_ipn_for_wordpress_txn_type_recurring_payment_skipped

Recurring payment skipped.

paypal_ipn_for_wordpress_txn_type_recurring_payment_profile_cancel

Recurring payment profile has been canceled.

paypal_ipn_for_wordpress_txn_type_recurring_payment_profile_created

Recurring payment profile has been created.

paypal_ipn_for_wordpress_txn_type_recurring_payment_suspended

Recurring payment has been suspended. This transaction type is sent if PayPal tried to collect a recurring payment, but the related recurring payments profile has been suspended.

paypal_ipn_for_wordpress_txn_type_recurring_payment_suspended_due_to_max_failed_payment

Recurring payment failed and the related recurring payment profile has been suspendedThis transaction type is sent if:

  • PayPal’s attempt to collect a recurring payment failed
  • The “max failed payments” setting in the customer’s recurring payment profile is 1 or greater
  • The number of attempts to collect payment has exceeded the value specified for “max failed payments” In this case, PayPal suspends the customer’s recurring payment profile.
paypal_ipn_for_wordpress_txn_type_send_money

Payment received; source is the Send Money tab on the PayPal website.

paypal_ipn_for_wordpress_txn_type_subscr_cancel

Subscription canceled.

paypal_ipn_for_wordpress_txn_type_subscr_eot

Subscription expired.

paypal_ipn_for_wordpress_txn_type_subscr_failed

Subscription payment failed.

paypal_ipn_for_wordpress_txn_type_subscr_modify

Subscription profile modified.

paypal_ipn_for_wordpress_txn_type_subscr_payment

Subscription payment received.

paypal_ipn_for_wordpress_txn_type_subscr_signup

Subscription started.

paypal_ipn_for_wordpress_txn_type_virtual_terminal

Payment received; source is the Virtual Terminal

paypal_ipn_for_wordpress_txn_type_web_accept

Payment received; source is any of the following:

  • A DoDirectPayment (Pro) credit card transaction
  • A Buy Now, Donation or Smart Logo for eBay Auctions button

Payment Status Hooks

paypal_ipn_for_wordpress_payment_status_canceled_reversal

A reversal has been canceled. For example, you won a dispute with the customer, and the funds for the transaction that was reversed have been returned to you.

paypal_ipn_for_wordpress_payment_status_completed

The payment has been completed, and the funds have been added successfully to your account balance.

paypal_ipn_for_wordpress_payment_status_created

A German ELV payment is made using Express Checkout.

paypal_ipn_for_wordpress_payment_status_declined

The payment was declined. This happens only if the payment was previously pending because of one of the reasons listed for the pending_reason variable or the Fraud_Management_Filters_x variable.

paypal_ipn_for_wordpress_payment_status_expired

This authorization has expired and cannot be captured.

paypal_ipn_for_wordpress_payment_status_failed

The payment has failed. This happens only if the payment was made from your customer’s bank account.

paypal_ipn_for_wordpress_payment_status_pending

The payment is pending. See pending_reason for more information.

paypal_ipn_for_wordpress_payment_status_refunded

You refunded the payment.

paypal_ipn_for_wordpress_payment_status_reversed

A payment was reversed due to a chargeback or other type of reversal. The funds have been removed from your account balance and returned to the buyer. The reason for the reversal is specified in the reason_code parameter.

paypal_ipn_for_wordpress_payment_status_processed

A payment has been accepted.

paypal_ipn_for_wordpress_payment_status_voided

This authorization has been voided.

Adaptive Payments Transaction Type Hooks

paypal_ipn_for_wordpress_adaptive_adaptive_payment_preapproval

An Adaptive Payments Preapproval profile has been created.

paypal_ipn_for_wordpress_adaptive_adaptive_payment_pay

An Adaptive Payments payment has been processed.

Adaptive Payments Status Hooks

paypal_ipn_for_wordpress_adaptive_status_canceled

An Adaptive Payments payment has been canceled.

paypal_ipn_for_wordpress_adaptive_status_created

An Adaptive Payments payment has been created.

paypal_ipn_for_wordpress_adaptive_status_completed

An Adaptive Payments payment has completed successfully.

paypal_ipn_for_wordpress_adaptive_status_incomplete

An Adaptive Payments payment is incomplete.

paypal_ipn_for_wordpress_adaptive_status_error

An Adaptive Payments payment failed with an error.

paypal_ipn_for_wordpress_adaptive_status_reversalerror

An Adaptive Payments payment reversal failed with an error.

paypal_ipn_for_wordpress_adaptive_status_processing

An Adaptive Payments payment is processing.

paypal_ipn_for_wordpress_adaptive_status_pending

An Adaptive Payments payment is pending.

Looking for Live Help?

Schedule a live meeting with Drew Angell, PayPal Certified Developer, and get all of your questions or concerns answered.