I want to change the total amount programatically before the payments are processed.

If the total amount is $1000 I want to give a discount based on a point system in the users profile. You can add the desired amount based on his total points. If he adds 20 he gets a $20 discount and only have to pay $800.

What is the best way to implement this? I have tried with commerce_transactions.onCreateTransaction but no luck.

1 Answer 1


Have you looked into building an adjuster for this purpose? You can find the documentation here

Your Answer

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

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