A one-time invoice can be created on demand for a subscription. It is configurable in the request where the order lines for the invoice should come from. The following are possible:
- Subscription plan (and attached subscription add-ons)
- Pending additional costs
- Pending credits
- Optionally given additional order lines
By default the invoice is generated and tried settled using the payment method attached to the subscription. If it cannot be settled it will enter dunning management as automatically generated subscription invoices. It is also possible to let the outcome of a creation be either a settled or a failed invoice by using the instant
parameter. This can be used for subscription invoices not relevant for possible dunning management.
Optionally either an offline manual transfer or a settle with an alternative payment method can be given for the invoice creation. The manual transfer will always settle the invoice. If a settle using an alternative payment method fails, the invoice will left pending if instant
is not used, and failed otherwise.
Errors
The operation can generate the following errors beside the generic HTTP error codes described here.
Error code | HTTP code | Description |
---|---|---|
12 | 404 | Subscription not found |
13 | 400 | Subscription expired |
95 | 400 | Subscription on-hold |
54 | 400 | The request results in an invoice with no order lines |
1 | 400 | Due argument was given for an instant invoice request |
76 | 400 | Payment method not provided and settle requested |
40 | 404 | Payment method provided not found |