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.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 |
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 |
amountmust be greater than or equal to 0 (0 means free)currencyuses ISO 4217 three-letter codes- Confirm you are not passing dollars instead of cents ($99.99 USD should be
9999, not99)
7.4 URL Validation
Check every URL individually:7.5 SFTP Connection Testing
Verify SFTP connectivity before uploading production data:7.6 API Authentication Testing
Verify API credentials and header configuration:- 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 sameIdempotency-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
Update a Session
Complete Payment
Cancel a Session
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 |
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 — Common questions about ACP integration