Charge a confirmed new-card quote
POST/api/invoices/:invoiceId/quote/confirm
Charges the card from POST /invoices/{invoiceId}/quote for exactly the quoted total, with the surcharge tagged as such on the processor transaction. Returns 200 with status: "success" when the card is approved, or 400 with a reasonCode: a number for a processor decline; "QUOTE_CHANGED" when the surcharge the rules give has changed since the quote (nothing is charged; quote again); "OUTCOME_UNKNOWN" when the charge was submitted but its outcome did not arrive in time (it may have gone through: re-read the invoice before charging again). An expired or already-used quote answers 400, as does a quote whose subtotal no longer fits the invoice's remaining balance (QUOTE_CHANGED, quote again); an invoice settled since the quote answers 400 with ALREADY_PROCESSING, and the pre-charge guards of PUT /invoices/{invoiceId}/payment apply (OVER_PAYMENT, ALREADY_PROCESSING). A 503 carries a reasonCode too: "NOT_CHARGED" when a read or the publish failed before any charge was submitted (nothing was charged; confirm again, and quote again if that reports the quote expired, since a failed publish settles the claimed quote and its card), "OUTCOME_UNKNOWN" when the outcome could not be read after the charge was submitted (re-read the invoice before charging again). The card is deleted after the charge unless savePaymentMethod is true, except on a subscription's invoice, where it is always kept on the customer (it is not bound to the subscription; a pending subscription's signup invoice is refused here and charged through POST /subscriptions/v2/payment-method instead). Authenticate with x-session-token header.
Request
Responses
- 200
- 400
- 404
- 503
200
400
404
503