Skip to main content

One-Off Charges

Beyond recurring subscriptions, you can charge a billable once for additional services, overages, or add-ons using the CreateInvoice action.

Creating a one-off charge

This creates and immediately collects an 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 returned Invoice 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