> ## Documentation Index
> Fetch the complete documentation index at: https://learn.orbexa.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ACP product data testing and validation

> ACP product data validation workflow — small-batch testing, format verification, common error troubleshooting, and integration checks.

# Testing and Validation

Systematic testing and validation before full-scale integration is the critical step for ensuring data quality.

## 7.1 Small-Batch-First Strategy

**Core principle**: Start with approximately 100 products, confirm everything works correctly, then scale up to full volume.

```
Phase 1: ~100 products    — Validate format and field correctness
Phase 2: ~1,000 products  — Validate batch processing and chunking
Phase 3: ~10,000 products — Validate performance and stability
Phase 4: Full catalog      — Production launch
```

Do not skip the early phases and jump straight to full volume. Small-batch testing catches format errors, missing fields, and encoding issues quickly, at a fraction of the cost of rolling back a full catalog submission.

## 7.2 Required Field Validation

Ensure all required fields are correctly populated:

| Object  | Required Field | Common Errors                          |
| ------- | -------------- | -------------------------------------- |
| Product | `id`           | Unstable IDs, duplicates               |
| Product | `variants`     | Empty array, missing Variant           |
| Variant | `id`           | Unstable IDs, cross-Product duplicates |
| Variant | `title`        | Empty string, missing                  |

```json theme={null}
{
  "id": "prod_001",
  "variants": [
    {
      "id": "var_001_black",
      "title": "Wireless Earbuds - Black"
    }
  ]
}
```

## 7.3 Price Format Validation

Prices must use **minor currency units** (the smallest denomination):

| Currency | Minor Unit        | Representation of 10.00 |
| -------- | ----------------- | ----------------------- |
| USD      | cent              | `amount: 1000`          |
| EUR      | cent              | `amount: 1000`          |
| JPY      | yen (no decimals) | `amount: 10`            |
| GBP      | penny             | `amount: 1000`          |

```json theme={null}
{
  "price": {
    "amount": 9999,
    "currency": "USD"
  }
}
```

**Validation checklist**:

* `amount` must be greater than or equal to 0 (0 means free)
* `currency` uses ISO 4217 three-letter codes
* Confirm you are not passing dollars instead of cents (\$99.99 USD should be `9999`, not `99`)

## 7.4 URL Validation

Check every URL individually:

```
Validation checklist:
1. URL format is valid (starts with https://)
2. Special characters are properly encoded (spaces use %20)
3. URL is publicly accessible (no login required)
4. No expiring session parameters are included
5. Image URLs return valid images
6. The utm_medium=feed tracking parameter is present
```

## 7.5 SFTP Connection Testing

Verify SFTP connectivity before uploading production data:

```
Test steps:
1. Connect to the SFTP server using the provided credentials
2. Upload a small file to verify write permissions
3. Confirm the file arrives in the target directory
4. Verify the file size matches (transfer integrity)
5. Attempt to overwrite the same filename to verify the overwrite mechanism
```

## 7.6 API Authentication Testing

Verify API credentials and header configuration:

```http theme={null}
GET /product_feeds/feed_abc123
Authorization: Bearer api_key_123
API-Version: 2025-09-12
Accept-Language: en-US
User-Agent: MyStore/1.0
Timestamp: 2026-04-11T08:30:00Z
```

A 200 response indicates the authentication is configured correctly. If you receive a 401 or 403, check:

* Whether the Bearer token is correct
* Whether the token has expired
* Whether account permissions have been activated

## 7.7 Common Error Troubleshooting

### HTTP 400: invalid\_payload

**Cause**: Malformed request body or missing required fields.

| Common Scenario                 | Solution                                        |
| ------------------------------- | ----------------------------------------------- |
| Missing `variants` array        | Every Product must contain at least one Variant |
| Variant missing `id` or `title` | Add the required fields                         |
| Price `amount` is negative      | Ensure `amount` is greater than or equal to 0   |
| Invalid JSON format             | Check brackets, quotes, and commas              |
| Encoding is not UTF-8           | Confirm the file and request use UTF-8          |

### HTTP 404: not\_found

**Cause**: The requested Feed or product does not exist.

| Common Scenario       | Solution                                                       |
| --------------------- | -------------------------------------------------------------- |
| Incorrect Feed ID     | Confirm you are using the ID returned by `POST /product_feeds` |
| Feed has been deleted | Recreate the Feed                                              |
| Path typo             | Check the URL path                                             |

### Idempotency Conflicts

If you send different request bodies using the same `Idempotency-Key`, a conflict may occur. Each distinct request batch must use a unique key.

## 7.8 Checkout Session Testing

If the merchant also implements Agentic Checkout endpoints, the complete transaction flow must be tested.

### Create a Session

```http theme={null}
POST /checkout_sessions
Content-Type: application/json

{
  "line_items": [
    {
      "product_id": "prod_001",
      "variant_id": "var_001_black",
      "quantity": 1
    }
  ]
}
```

### Update a Session

```http theme={null}
POST /checkout_sessions/:id
Content-Type: application/json

{
  "shipping_address": {
    "line1": "123 Main St",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94102",
    "country": "US"
  }
}
```

### Complete Payment

```http theme={null}
POST /checkout_sessions/:id/complete
```

### Cancel a Session

```http theme={null}
POST /checkout_sessions/:id/cancel
```

Test all four flows and confirm that state transitions are correct and error handling is robust.

## 7.9 Delegate Payment Testing

Stripe provides a test mode for payment integration testing:

| Test Item            | Description                                                           |
| -------------------- | --------------------------------------------------------------------- |
| Test keys            | Use Stripe test-mode API keys                                         |
| Test card numbers    | Use Stripe's provided test card numbers                               |
| Vault token          | `vt_test_...` tokens generated in test mode                           |
| Payment confirmation | Verify payment status callbacks are correct                           |
| 3DS testing          | Use Stripe's 3DS test card numbers to trigger the authentication flow |

Test mode does not generate real transactions, allowing you to safely validate the full payment flow.

## 7.10 Post-Launch Data Sync Monitoring

After going live, continuously monitor data synchronization:

| Metric                   | Recommendation                                     |
| ------------------------ | -------------------------------------------------- |
| SFTP upload success rate | Check daily that files arrive successfully         |
| API request success rate | Monitor 4xx and 5xx error rates                    |
| Data consistency         | Periodically compare local data against Feed data  |
| Price accuracy           | Spot-check prices for correctness                  |
| Inventory sync latency   | Measure time from inventory change to Feed update  |
| Promotion status         | Confirm promotions activate and expire on schedule |

***

**Next chapter**: [Chapter 8: Frequently Asked Questions](/en/book-4/ch8-faq) — Common questions about ACP integration
