> For the complete documentation index, see [llms.txt](https://resources.atriptech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://resources.atriptech.com/api-document/support-and-reference/troubleshooting-and-support/errors-handing/402-vs-404-vs-406-vs-615.md).

# 402 vs 404 vs 406 vs 615

{% hint style="info" %}
💬 **Need help?** If you're stuck, ask Eva in the Help Center for instant diagnostics.

<a href="https://www.atriptech.com/" class="button primary" data-icon="comments">Ask Eva</a>
{% endhint %}

Use this page when payment looks unclear and you need to know whether another `pay.do` call is safe.

### Short answer

`402` means the current order state does not support payment.

`404` means the order is already paid.

`406` means a payment is still in progress.

`615` means payment completed but the airline PNR is still pending.

In all four cases, do not retry payment blindly.

### FAQ

#### Should I retry `pay.do` after `402`?

No.

Query the order first.

#### Should I retry `pay.do` after `404`?

No.

The order is already paid.

#### Should I retry `pay.do` after `406`?

Not yet.

Wait and poll the order until the in-flight payment finishes.

#### Should I retry `pay.do` after `615`?

No.

Payment already completed.

Monitor the order instead.

### Core difference

#### `402` — order state does not support payment

**What it usually means**

The order is not in a payable state.

It may already be ticketing or ticketed.

**Next action**

Query the order.

Use the current order state as the source of truth.

#### `404` — order already paid

**What it usually means**

A prior payment already succeeded.

**Next action**

Do not call `pay.do` again.

Continue with order follow-up.

#### `406` — payment operation in progress

**What it usually means**

A previous payment request is still running.

**Next action**

Wait.

Poll `queryOrderDetails.do` until the state becomes clear.

#### `615` — payment completed but PNR still pending

**What it usually means**

Atlas completed payment, but final airline PNR retrieval is still unresolved.

**Next action**

Do not retry payment.

Keep monitoring the order.

### Quick decision rule

Use this rule in production:

* `402` — query order first
* `404` — stop payment retry
* `406` — wait and poll
* `615` — monitor order, never repay

### What these codes have in common

All four codes are order-state problems, not simple payment-input problems.

They tell you to check the existing order state before any new payment attempt.

### What to check next

After any of these codes, check:

* `orderStatus`
* `ticketStatus`
* airline PNR details when available
* whether payment is already complete or still processing

### Common mistakes

#### Treating `406` like a normal failure

Do not do this.

It means the first payment is still running.

#### Treating `615` like an unpaid order

Do not do this.

Payment already succeeded.

#### Retrying `402` or `404` without checking the order

Do not do this.

This creates duplicate-payment risk.

### Best practice

After `pay.do`, keep one recovery rule:

If the order might already be paid, ticketing, or pending airline confirmation, switch to order query before any further payment action.

### Related pages

* [Payment Errors](/api-document/support-and-reference/troubleshooting-and-support/errors-handing/payment-errors.md)
* [Payment & Ticketing](/api-document/product-guides/booking/booking-step-guides/payment-and-ticketing.md)
* [Polling and Ticketing Timing](/api-document/product-guides/booking/booking-step-guides/query-order/post-payment-polling.md)
* [Query Order](/api-document/product-guides/booking/booking-step-guides/query-order.md)
* [Hybrid Payment Guide](/api-document/product-guides/booking/booking-step-guides/payment-and-ticketing/hybrid-payment-guide.md)
* [Error Codes](/api-document/support-and-reference/troubleshooting-and-support/errors-handing.md)
