> 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/readme-1/sandbox-development.md).

# Sandbox Development

Atlas API sandbox development guide for building, testing, and validating booking workflows before UAT.

{% 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 to build and validate the full Atlas integration in sandbox.

{% hint style="warning" %}
For first-time integrations, settlement currency may not be configured in Atlas yet.

In sandbox, add `"currency":"USD"` manually in the `Search` request until the account setup is complete.
{% endhint %}

{% hint style="info" %}
Before you build the integration, run the [Sandbox Validation Test Kit](https://resources.atriptech.com/api-document/readme-1/sandbox-development/sandbox-validation-test-kit.md).

Use it to confirm credentials, network access, and the core happy path without writing code.
{% endhint %}

Start here when you need to:

* build the full sandbox booking flow
* validate webhook handling and follow-up logic
* confirm the integration is ready for UAT

### FAQ

#### What should be working before sandbox development starts?

Sandbox credentials should work first.

Headers, request format, and gzip handling should also be ready.

#### What proves sandbox development is complete?

The full booking flow should run end to end in a stable way.

Your team should also be able to reproduce expected success and failure paths.

### Goal of this phase

Build the end-to-end integration flow in sandbox.

This phase should cover both API execution and webhook follow-up.

### Fast setup check

Use the [Sandbox Validation Test Kit](https://resources.atriptech.com/api-document/readme-1/sandbox-development/sandbox-validation-test-kit.md) before full development work.

It validates `Search`, `Verify`, `Order`, and `Pay`.

If the final retrieve step times out, treat that as expected during ticketing polling.

### What sandbox can validate

Use sandbox to validate:

* request format and headers
* search, verify, order, payment, and query flow
* webhook handling and follow-up logic
* failure handling and edge cases
* UAT readiness

### What sandbox does not prove

Sandbox does **not** prove:

* live inventory quality
* production pricing accuracy
* real card charging behavior
* final airline-side behavior in all cases

Treat sandbox fares and outcomes as test-only.

### Before you start

Make sure you already have:

* sandbox credentials from ATRIP
* the sandbox base URL: `https://sandbox.atriptech.com/`
* request headers configured
* a basic server-side integration ready to test

### Use MCP during development

Use [MCP-Assisted Development](https://resources.atriptech.com/api-document/readme-1/integration-tools/mcp-assisted-development.md) when you need help finding the right flow, page, or next API step.

It works well for:

* mapping `Search` to `Pay`
* checking which identifier to keep and reuse
* routing errors to the right troubleshooting page

### Development checklist

Complete these items in sandbox:

* configure authentication and headers
* point your client to sandbox
* implement search, verify, order, payment, and query
* register and validate webhooks
* test failure handling and edge cases

During this phase, keep and reuse:

* `routingIdentifier`
* `sessionId`
* `orderNo`

### Recommended build order

{% stepper %}
{% step %}

### Confirm sandbox setup

Make sure credentials, headers, gzip handling, and the sandbox base URL are working.
{% endstep %}

{% step %}

### Build the booking flow

Implement search, verify, order creation, payment, and order query.
{% endstep %}

{% step %}

### Add webhook handling

Register the webhook endpoint and validate event delivery and processing.
{% endstep %}

{% step %}

### Test expected failures

Simulate payment and flow failures and confirm error handling works as expected.
{% endstep %}

{% step %}

### Prepare for UAT

Keep traceable test orders and confirm the full sandbox flow is stable and repeatable.
{% endstep %}
{% endstepper %}

### Test mode

In test mode:

* bookings are simulated
* tickets are not issued with live airlines
* fares are sandbox fares
* test credentials only work in sandbox
* live credentials only work in production

Use test mode to validate:

* request construction
* booking state transitions
* payment and ticketing logic
* expected error handling
* webhook and follow-up behavior

### Sandbox fare behavior

Sandbox search results come from Atlas sandbox data.

Coverage and pricing are not the same as production.

Do not use sandbox prices for commercial comparison.

### Asynchronous ticketing failure simulation

All scenarios below simulate **asynchronous ticketing failures after successful order creation**. Failures are not returned in the synchronous response from `pay.do` or `order.do`.

There are two trigger methods:

* Pass a test value in the `pay.do` request.
* Pass a test value in `passengers[].name` in the `order.do` request.

Use one failure scenario per test order. These test values are for sandbox only.

#### Trigger through `pay.do`

Set the cardholder first name in `pay.do`:

| Cardholder first name | Returned code | Simulated result                |
| --------------------- | ------------- | ------------------------------- |
| `Reject`              | `633`         | Payment declined by the airline |
| `Three DS`            | `616`         | 3DS authentication failure      |

Any card number and last name can be used for these scenarios.

#### Trigger through `order.do`

When calling `order.do`, set `passengers[].name` in **last name/first name** order. Set the last name to `ERROR` and the first name to one of the following scenario keywords.

| `passengers[].name` value | Returned code | Simulated result or condition                                              |
| ------------------------- | ------------- | -------------------------------------------------------------------------- |
| `ERROR/PRICE`             | `601`         | Price change; returns twice the original amount                            |
| `ERROR/PRICEREALTIME`     | `601`         | Price change; triggers only during real-time airline order creation        |
| `ERROR/DUPLICATE`         | `608`         | Duplicate booking                                                          |
| `ERROR/FLIGHT`            | `606`         | Flight information change                                                  |
| `ERROR/DOCUMENT`          | `605`         | Invalid passenger information                                              |
| `ERROR/MAILBOX`           | `609`         | Contact email blocked by the airline                                       |
| `ERROR/CARD`              | `633`         | Payment declined by the airline                                            |
| `ERROR/AGE`               | `614`         | Passenger age error                                                        |
| `ERROR/RESIDENT`          | `6051`        | The airline cannot serve this passenger                                    |
| `ERROR/309`               | `618`         | Baggage specifications do not meet airline requirements                    |
| `ERROR/3011`              | `631`         | Baggage price change; returns 1.2 times the original amount                |
| `ERROR/FARESME`           | `603`         | Flight sold out; sets the fare type to `SME`                               |
| `ERROR/SEAT`              | `607`         | Seat unavailable; requires at least one passenger to have purchased a seat |

#### Query the asynchronous failure result

For either trigger method, query the final result through `queryOrderDetails.do`.

When the order status is cancelled, the response contains the applicable error code and error message. Use this query result to determine the asynchronous ticketing failure, not the synchronous response from `pay.do` or `order.do`.

### Reference data for sandbox

Use these shared reference pages when you need published sandbox inputs:

* [Booking Overview](https://resources.atriptech.com/api-document/product-guides/booking/booking-overview.md)
* [Webhook Overview](https://resources.atriptech.com/api-document/product-guides/extensions-and-integrations/webhook-overview.md)
* [Sandbox Test Routes](https://resources.atriptech.com/api-document/support-and-reference/integration-reference/sandbox-test-data/sandbox-test-routes.md)
* [Sandbox Test Cards](https://resources.atriptech.com/api-document/support-and-reference/integration-reference/sandbox-test-data/sandbox-test-cards.md)
* [Integration Reference](https://resources.atriptech.com/api-document/support-and-reference/integration-reference.md)

### Complete this phase when

You can do all of these reliably in sandbox:

* run the booking flow end to end
* keep and reuse `routingIdentifier`, `sessionId`, and `orderNo`
* validate the required payment path
* receive and process the required webhook events
* reproduce expected success and failure cases

### Output of this phase

* stable sandbox booking flow
* validated webhook handling
* evidence ready for UAT

### Next step

Move to [UAT Validation](https://resources.atriptech.com/api-document/readme-1/uat-submission-guide.md) after the sandbox flow is stable.

### Related pages

* [Quick Start](https://resources.atriptech.com/api-document/readme-1/quick-start.md)
* [Sandbox Access](https://resources.atriptech.com/api-document/readme-1/making-requests.md)
* [Sandbox Validation Test Kit](https://resources.atriptech.com/api-document/readme-1/sandbox-development/sandbox-validation-test-kit.md)
* [UAT Validation](https://resources.atriptech.com/api-document/readme-1/uat-submission-guide.md)
* [Webhook Overview](https://resources.atriptech.com/api-document/product-guides/extensions-and-integrations/webhook-overview.md)
