CiviCRM 5.16.3 on Drupal 7. I would like to show payment menthods of contribution in template Contribution - Receipt (on-line). I tried to insert $formValues.paidby or $paidby but they show nothing. (I saw those variables at off-line version of receipt and copied the them without even knowing if they are populated in the on-line workflow.)

How can I show payment methods and check numbers like those in off-line version?

Thank you.

1 Answer 1


I figured out myself.

Put this API call somewhere upfront in the template. This retrieve contribution payment method by ID. (Get the whole record if removing "return" parameter.)

     {crmAPI var='apiResult' entity='Contribution' action='get' return="payment_instrument_id" contribution_id=$contributionID}

At where it should be displayed:

     {foreach from=$apiResult.values item=contribution}



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.