# PAYMENT_FAILED

# PAYMENT_FAILED

The payment processor returned a transient failure (network error, processor outage, gateway timeout) while authorizing the order. The user's card was not necessarily declined — the processor was unable to give a definitive answer.

## Summary

| Field | Value |
|---|---|
| HTTP status | `400` |
| `errorCategory` | `payment` |
| `retryable` | `true` |

## When This Fires

- **`POST /v1/marketfront/orders/place`** — payment authorization (Stripe, Clover, or other configured processor) returned an error that does not indicate a definitive decline.

## Recommended Action

This is one of the few `retryable: true` errors. Backoff and retry with the same idempotency key:

1. Wait briefly (1–3s with jitter).
2. Resubmit `POST /v1/marketfront/orders/place` with the **same** `Idempotency-Key` header — the server will deduplicate if the original attempt eventually succeeded.
3. After 2–3 failed retries, surface "we're having trouble processing your payment" and let the user pick a different payment method.

Do **not** discard the idempotency key between retries — that risks a double-charge.

## Example

```json
{
  "type": "https://developer.gett-tech.com/errors/PAYMENT_FAILED",
  "title": "Bad Request",
  "status": 400,
  "detail": "There was an error with your payment. Please try again.",
  "instance": "/v1/marketfront/orders/place",
  "requestId": "req_abc123",
  "timestamp": "2026-04-27T14:30:00.000Z",
  "errorCode": "PAYMENT_FAILED",
  "errorCategory": "payment",
  "retryable": true
}
```
