By credit card? :-) Sillyness aside, it is a regular contract. About 6 years ago you could get Bing results through the Yahoo BOSS API[1]. I'm not sure what they charge these days but they used to charge about 80 cents per thousand queries.
You take the query terms and send it to an ad network (or ideally your own ad infrastructure) and the network sends back 1 - 10 advertisements based on the query terms. You put those and the "organic" results you got back from the API out as your search page.
You hope that in the thousand queries you process, some of the people click on the ad links instead of the organic links. If enough do, you "make" the difference between the money you get paid by the ad network and the money you paid to the search index.
If you can send a lot of queries, then you are more valuable to the search company than they are to you, and they will start to pay you to send them these queries. (this is what Google calls "traffic acquisition costs" in their earnings reports). But we are talking a lot of queries, you'd need a really popular Linux distribution or Web Browser to pull that off. Just a search landing page won't cut it.
The contract will also detail things that you can't advertise when you get results from the search index. For example in California Google can't allow anyone to show a payday loan ad next to Google results.
And there are subtleties within that as well, you typically get a fraction of the revenue on an ad that gets clicked on as the "first" click after showing the search engines results, but you can get more (or all) of the revenue on pages that you show after that. That trick is used by people who crawl all of Wikipedia and then show a version of Wikipedia with ads where they buy an ad on Google's results for Wikipedia type queries, and then send you to their own page / copy of Wikipedia with their much more profitable ads.
The more complex it gets the more sketchy the players involved.
[1] https://developer.yahoo.com/search/boss/boss_guide/BOSS_Gett...