How to use a standalone page with a module I'm working on a website that communicates with a bank API.
During the process, the API sends a request to a callback page. I, therefore, created a "callback_bank.php" file, and put it at the root of the drupal folder (along with index.php, cron.php, etc.) so it's accessible by http://www.mywebsite.com/callback_bank.php

How would I go about packaging/deploying that file with the custom module I created, that does the rest of the work ?

Thank you!
Assuming the return path is configurable with the bank, you'd be better to create a hook_menu callback to handle the bank response.

That way you can leverage the Drupal API, e.g access callback to restrict to their IP address range to prevent spoofing etc..

e.g:

/**
 * Implements hook_menu().
 */
function MYMODULE_menu() {
  $items = array();

  $items['payment/callback'] = array(
    'title' =&gt; 'Payment callback',
    'page callback' =&gt; 'MYMODULE_payment_callback_handler',
    'access callback' =&gt; 'MYMODULE_payment_callback_access',
    'type' =&gt; MENU_CALLBACK,
    'file' =&gt; 'MYMODULE.pages.inc',
  );

  return $items;
}


The bank can then request https://www.yoursite.com/payment/callback?param1=foo&amp;param2=bar