An audience that laughs more pays more. A comedy club in Spain has adopted that payment plan to recoup ticket losses.

Barcelona's Teatreneu club, in conjunction with advertising agency The Cyranos McCann, installed tablets to the back of the theater seats. Each tablet has facial-recognition software downloaded on it and records every time an audience member laughs, according to The Independent.

Admission into the club is free, but each laugh costs .30 euros (38 cents), up to 24 euros (about $30.50). The laugh maximum charged is 80 laughs and a show with no laughs costs nothing.

The club premiered the payment system in April and installed the service for new improvisation shows in July and August.

The club made the change when the Spanish government raised the tax on theater tickets from 8 percent to 21 percent. Attendance at the club dropped by 30 percent after the tax went into effect.

Pay per Laugh | The Cyranos McCann from The Cyranos McCann on Vimeo.

"Faced with this reality, the independent comedy theater company Teatreneu decided to look at the situation with humor and invented something: Pay Per Laugh," the club said in a video demonstrating the technology.

The cost per laughs raised the average ticket price by 6 euros ($7.63). Attendance also increased by 35 percent.

Audience members can pay their "laughter account" using a new app launched by the club, according to BBC News. They can also share photos from their account info on social media.

Club attendees also can purchase a season ticket based on laughs.

Other Spanish venues have started to install similar technology.