Skip to main content
When a payment fails, the failure cause is added to the failure object of the Payment returned by the HUB2 API. The PaymentIntent also exposes the cause of the last failed attempt in lastPaymentFailure.

Important

These are application errors, unrelated to the HTTP protocol.The HTTP status codes returned by each HUB2 API endpoint are listed in the HUB2 API reference.
The failure causes on this page only concern errors encountered while a transaction is processed. The failure object contains a code, a message that is human-readable when a translation is available, and, for invalid parameters, the list of the parameters concerned (params). Map the code to your own customer-facing text rather than displaying message as is.
New failure causes may be added over time. Handle unknown codes gracefully, for example as a generic failure.