Send Offline Events to Facebook Ads using PHP

If you are using Facebook Ads, chances are that you are simply using the conversion pixel and standard events to optimize your bids. But in complexe scenarios, you cannot use live events, and you need to switch to Offline events instead.
What we’re going to see here, is how to send a purchase events to Facebook, when this purchase has been created/validated manually by the admin via a back office.
I recently had to help implementing Facebook Offline Events in a PHP environment. The client that needed to have offline events was an online retailer selling expensive products. He couldn’t simply accept online orders, he also needed to verify each single one before sending the purchase. Their internal workflow was designed in this way to avoid frauds. In addition to that, as products are expensive, purchasing with a credit card could lead to payment issues with banks. So most customers like to purchase via bank transfers instead.
»