I use commerce to create a bakery. Unfortunately, there is no module to pay by check or cash. So I use the payment example "manual". I need to debit the user account when a payment is entered (a "balance" field has been created on the user account). Is there a hook when a payment is created so that I can do this operation on the user entity?

  • There is no module for paying by check or cash because those use cases are fully covered by the Manual gateway, it's not an "example" gateway, that's what it was built for. Jun 22, 2018 at 13:30

1 Answer 1


One option would be to use hook_entity_create() but I would rather react on Order transition event, such as commerce_order.place.post_transition which is triggered when Order reaches Completed state.

  • I just see that there is 3 state of payment. orders/127/payments/20/operation/receive orders/127/payments/20/operation/refund orders/127/payments/20/operation/void So I need to interact with these 3 payment states regardless of the bill status. Do U think commerce_order.place.post_transition should be the solution ? Jun 21, 2018 at 9:58
  • Finally I must be informed when: - there is payment completed - A payment is avoided For these two cases I chose the hook_entity. - an order is completed - a command is deleted For the completed order I used the event : commerce_order.place.post_transition But I do not find a way to be informed when an order is deleted, the event commerce_order.commerce_order.delete does not work? Jul 2, 2018 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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