Generates and posts invoices and credit memos and collects payments for posted invoices. Credit memos are only available if you have the Invoice Settlement feature enabled and negative charges exist. Credit memos will not be applied to invoices. If draft invoices and credit memos exist when you run this operation, this operation will post the invoices and credit memos. Note that draft credit memos created from an invoice or a product rate plan charge will not be posted.
You can use this operation to generate invoices and collect payments on the posted invoices, or else simply collect payment on a specified existing invoice. The customer's default payment method is used, and the full amount due is collected. The operation depends on the parameters you specify.
To generate one or more new invoices for that customer and collect payment on the generated and other unpaid invoice(s), leave the invoiceId field empty.
To collect payment on an existing invoice, specify the invoice ID.
The operation is atomic; if any part is unsuccessful, the entire operation is rolled back.
When an error occurs, gateway reason codes and error messages are returned the error response of this operation. The following items are some gateway response code examples.
- Orbital:
05 Do Not Honor; 14 Invalid Credit Card Number - Vantiv:
301 Invalid Account Number; 304 Lost/Stolen Card - CyberSource2:
202 Expired card; 231 Invalid account number
For more reason code information, see the corresponding payment gateway documentation.
Timeouts may occur when using this method on an account that has an extremely high number of subscriptions.