post https://api.reepay.com/v1/invoice//settle
Settle pending, dunning or failed invoice using a customer payment method or subscription payment method for a subscription invoice. For a customer invoice an optional due date and time can be supplied delaying the settle until this date and time.
Returns an Invoice object. The invoice state depends on the origin of the invoice. A one-time customer invoice will be either settled
or failed
while a subscription invoice will keep its state if the settle fails.
Errors
The operation can generate the following errors beside the generic HTTP error codes described here.
Error code | HTTP code | Description |
---|---|---|
31 | 404 | Invoice not found |
80 | 400 | Invoice cannot be settled because it has processing transactions |
76 | 400 | Payment method not provided |
40 | 404 | Payment method not found |
147 | 400 | Stored payment method is in failed state and it is not allowed to retry because of scheme or payment provider rules |