Is there any hook or rules event that will help to catch the payment failure in Drupal Commerce?

Thank you


There is no direct hook or event, but essential to payment transactions in Drupal Commerce is that they should be created for every attempted transaction, not just complete ones. This means when a payment fails, a payment transaction will still be created for your order. Thus you can hook into the payment transaction creation process (or use Rules on the related event) to look for failed transactions based on the transaction status.


Try using the hook_commerce_payment_transaction_status_info()

Here is a link to the api and link to documentation,

  • It just defines the transaction statuses. Not a hook to catch any event. – Junaid Oct 29 '13 at 12:11
  • 2
    Can you not check if the payment status is Failure, and if it is do whatever you would like – 4life Oct 29 '13 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.