API Docs

This functionality of the Ubiquity API has been disabled. Looking for information on this transition to LeaseWeb? Click here for answers to FAQs and here for information on the LeaseWeb customer portal. Click here for information about the Leaseweb API.

Get to know pay_invoice

Overview: pay_invoice charges the balance of the indicated invoice to the provided payment method. It expects to be called with an associative array of parameters including the following keys:

  • invoice_id - The unique ID of the invoice to be charged.
  • card_id - The unique ID of the credit card to be charged. This is not any number present on the card. The unique if of the card is the identifier of the card in Ubiquity's billing system. You can find this using client.get_payment_methods.
  • [service_id] - Optional. Only charge line items related to the provided service id.

Example:

$params = array(
		'invoice_id' => 854990,
		'card_id' => 5930,
		'service_id' => 35686
	);
$api->call('billing.pay_invoice', $params);

Output:

Array
	(
	    [status] => 1
	)