One-Off Charges
Beyond recurring subscriptions, you can charge a billable once for additional services, overages, or add-ons using theCreateInvoice action.
Creating a one-off charge
Invoice against the customer’s default payment method. The action returns the Invoice model.
Multiple line items
Passing options
Pass metadata or a specific gateway as the third argument:Accessing the invoice
The returnedInvoice model gives you the full invoice record:
Handling payment failure
If the charge fails,CreateInvoice throws Pixelworxio\Subscribd\Exceptions\PaymentFailedException:
Retrying a failed invoice
Next steps
- Invoice History — Listing and displaying invoices
- Tax — Tax handling on invoices