> ## Documentation Index
> Fetch the complete documentation index at: https://docs-test.rye.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Products

> Test products and edge-case scenarios for stress-testing checkout flows.

export const CopyURL = ({url}) => {
  const [copied, setCopied] = useState(false);
  return <div style={{
    display: "flex",
    alignItems: "center",
    justifyContent: "space-between",
    gap: "8px",
    marginTop: "8px",
    marginBottom: "4px"
  }}>
      <code style={{
    fontSize: "13px"
  }}>{url}</code>
      <button onClick={() => {
    navigator.clipboard.writeText(url);
    setCopied(true);
    setTimeout(() => setCopied(false), 2000);
  }} style={{
    border: "1px solid #e2e8f0",
    borderRadius: "4px",
    padding: "2px 6px",
    fontSize: "11px",
    cursor: "pointer",
    background: copied ? "#f0fdf4" : "#fff",
    color: copied ? "#16a34a" : "#64748b",
    flexShrink: 0
  }} title="Copy URL">
        {copied ? "✓" : "Copy"}
      </button>
    </div>;
};

All test products below are on **`rye-test-store.myshopify.com`**. Use [Stripe test cards](https://docs.stripe.com/testing) for payment.

<Info>
  `rye-protocol.myshopify.com` is also available for production test orders. It uses a **live payment gateway** — payments are not captured and funds are automatically returned to the card after \~1 week.
</Info>

## Shipping & Delivery

<AccordionGroup>
  <Accordion title="Standard Product (Baseline)" defaultOpen>
    Use as a **baseline** for comparison against edge-case products.

    <CopyURL url="https://rye-test-store.myshopify.com/products/product-published-to-rye-channel" />
  </Accordion>

  <Accordion title="3PL Product (Carrier-Calculated Shipping)">
    A product fulfilled via **third-party logistics (3PL)**. Shipping rates are calculated dynamically by the carrier based on the buyer's shipping address, rather than being flat rates set by the merchant.

    <CopyURL url="https://rye-test-store.myshopify.com/products/test-product-3pl" />

    **Expected behavior:**

    * Shipping rates vary based on the buyer's address
    * Applying a discount code may cause the available shipping options to change (e.g., if the discounted total drops below a free shipping threshold)
  </Accordion>

  <Accordion title="Digital Product">
    A digital product (e.g., an ebook or software license) that does not require physical shipping.

    <CopyURL url="https://rye-test-store.myshopify.com/products/digital-product" />

    | Field     | Value   |
    | --------- | ------- |
    | **Price** | `$9.99` |

    **Expected behavior:**

    * A free shipping method is returned on the checkout intent
    * Shipping cost is \$0
  </Accordion>

  <Accordion title="Heavyweight / Oversized Product">
    A product with a **very high weight** (100 lbs). Tests weight-based shipping rate calculations.

    <CopyURL url="https://rye-test-store.myshopify.com/products/heavyweight-product" />

    | Field     | Value     |
    | --------- | --------- |
    | **Price** | `$199.99` |

    **Expected behavior:**

    * Shipping rates significantly higher than standard products
  </Accordion>

  <Accordion title="Delayed Shipping Product">
    Use with the shipment advance test helper to simulate a delayed shipment.

    <CopyURL url="https://rye-test-store.myshopify.com/products/delayed-shipping-product" />

    **Expected behavior:**

    * The shipment advance helper follows `ordered -> shipped -> out_for_delivery -> delayed -> delivered`
  </Accordion>

  <Accordion title="Canceled Shipping Product">
    Use with the shipment advance test helper to simulate a canceled shipment.

    <CopyURL url="https://rye-test-store.myshopify.com/products/canceled-shipping-product" />

    **Expected behavior:**

    * The shipment advance helper follows `ordered -> canceled`
  </Accordion>
</AccordionGroup>

## Inventory & Availability

<AccordionGroup>
  <Accordion title="Sold Out Product">
    A product with **0 inventory** that cannot be purchased.

    <CopyURL url="https://rye-test-store.myshopify.com/products/sold-out-product" />

    **Expected behavior:**

    * Checkout intent fails with `product_out_of_stock`
  </Accordion>

  <Accordion title="Partially Out-of-Stock Variants">
    A product where **some variants are in stock and others are sold out**.

    <CopyURL url="https://rye-test-store.myshopify.com/products/partial-stock-variants" />

    | Field        | Value                                                         |
    | ------------ | ------------------------------------------------------------- |
    | **Price**    | `$40.00`                                                      |
    | **Variants** | Size: S (in stock), M (in stock), L (sold out), XL (sold out) |

    **Expected behavior:**

    * Selecting an in-stock variant (S or M) succeeds
    * Selecting a sold-out variant (L or XL) fails with `product_out_of_stock`
  </Accordion>

  <Accordion title="Unpublished / Draft Product">
    A product that is **not published to any sales channel** (draft or hidden).

    <CopyURL url="https://rye-test-store.myshopify.com/products/unpublished-draft" />

    | Field     | Value    |
    | --------- | -------- |
    | **Price** | `$25.00` |

    **Expected behavior:**

    * Product URL returns 404
    * Checkout intent fails with `offer_retrieval_failed`
  </Accordion>
</AccordionGroup>

## Variants & Options

<AccordionGroup>
  <Accordion title="Different Variant Prices">
    A product where **each variant has a different price point**.

    <CopyURL url="https://rye-test-store.myshopify.com/products/test-product-with-different-variant-prices" />

    **Expected behavior:**

    * Offer returns the correct price for the selected variant
    * Switching variants updates the price, shipping, and tax accordingly
  </Accordion>

  <Accordion title="Many Variants (25+)">
    A product with **many variant combinations** (5 colors x 5 sizes = 25 variants) with different prices per variant.

    <CopyURL url="https://rye-test-store.myshopify.com/products/many-variants" />

    | Field     | Value                                  |
    | --------- | -------------------------------------- |
    | **Price** | `$35.00 to $55.00` (varies by variant) |

    **Expected behavior:**

    * All 25 variants available for selection
    * Offer reflects the correct price for the selected variant
  </Accordion>
</AccordionGroup>

## Pricing & Tax

<AccordionGroup>
  <Accordion title="High-Value Product ($9,999.99)">
    A product at a very high price point.

    <CopyURL url="https://rye-test-store.myshopify.com/products/high-value-product" />

    | Field     | Value       |
    | --------- | ----------- |
    | **Price** | `$9,999.99` |

    **Expected behavior:**

    * Offer returns `cost.subtotal.amountSubunits` = `999999`
    * Checkout completes successfully
  </Accordion>

  <Accordion title="Sale / Compare-at Price">
    A product with a **compare-at (original) price** showing a discount on the storefront.

    <CopyURL url="https://rye-test-store.myshopify.com/products/on-sale-compare-at" />

    | Field     | Value                          |
    | --------- | ------------------------------ |
    | **Price** | `$19.99` (compare-at `$39.99`) |

    **Expected behavior:**

    * Offer returns the selling price (\$19.99), not the compare-at price
  </Accordion>

  <Accordion title="Tax-Exempt Product">
    A product that is not subject to sales tax.

    <CopyURL url="https://rye-test-store.myshopify.com/products/tax-exempt-product" />

    | Field     | Value    |
    | --------- | -------- |
    | **Price** | `$25.00` |

    **Expected behavior:**

    * `cost.tax.amountSubunits` = `0`
    * Total = subtotal + shipping (no tax component)
  </Accordion>

  <Accordion title="Gift Card">
    A gift card product with no shipping required and no tax applied.

    <CopyURL url="https://rye-test-store.myshopify.com/products/test-gift-card" />

    | Field             | Value                |
    | ----------------- | -------------------- |
    | **Denominations** | `$25`, `$50`, `$100` |

    **Expected behavior:**

    * A free shipping method is returned
    * No tax applied
    * Fulfillment is digital (email delivery)
  </Accordion>
</AccordionGroup>

## Product Data Edge Cases

<AccordionGroup>
  <Accordion title="No Images">
    A product with **no product images uploaded**.

    <CopyURL url="https://rye-test-store.myshopify.com/products/no-images-product" />

    | Field     | Value    |
    | --------- | -------- |
    | **Price** | `$10.00` |

    **Expected behavior:**

    * Offer returns empty images array
    * Checkout completes without errors
  </Accordion>

  <Accordion title="Long Title & Special Characters">
    A product with a **255-character title** containing unicode, accented characters, and special symbols.

    <CopyURL url="https://rye-test-store.myshopify.com/products/long-title-special-chars" />

    | Field     | Value    |
    | --------- | -------- |
    | **Price** | `$15.00` |

    **Expected behavior:**

    * Product title returned without truncation or encoding issues
    * Checkout completes without errors
  </Accordion>
</AccordionGroup>

## Discounts & Promo Codes

<AccordionGroup>
  <Accordion title="Manual Discount Code">
    A product with a discount code that can be passed via the `promoCodes` field.

    <CopyURL url="https://rye-test-store.myshopify.com/products/discount-test-product" />

    | Field             | Value                    |
    | ----------------- | ------------------------ |
    | **Price**         | `$50.00`                 |
    | **Discount Code** | `TESTDISCOUNT` (20% off) |

    **Expected behavior:**

    * Pass `promoCodes: ["TESTDISCOUNT"]` when creating the checkout intent
    * Offer `cost.discount.amountSubunits` reflects 20% off
    * Only one discount code per order
  </Accordion>

  <Accordion title="Discount That Crosses Free Shipping Threshold">
    A product priced **just above the free shipping threshold**, with a discount code that drops the subtotal below it.

    <CopyURL url="https://rye-test-store.myshopify.com/products/free-shipping-threshold" />

    | Field             | Value    |
    | ----------------- | -------- |
    | **Price**         | `$52.00` |
    | **Discount Code** | `SAVE10` |

    **Expected behavior:**

    * Without discount: free shipping applies
    * With `SAVE10`: subtotal drops to \$42, free shipping no longer available, shipping cost increases

    <Warning>
      Applying a discount can change the available shipping methods if the discounted subtotal crosses a free shipping threshold.
    </Warning>
  </Accordion>
</AccordionGroup>

## Checkout Failures

<AccordionGroup>
  <Accordion title="Always Fails During Checkout">
    A product that always **fails during checkout submission** at the merchant. Useful for exercising post-payment failure handling.

    <CopyURL url="https://rye-test-store.myshopify.com/products/fails-during-checkout" />

    **Expected behavior:**

    * Offer retrieval and checkout intent creation succeed
    * Checkout intent fails with reason `order_placement_failed`
  </Accordion>
</AccordionGroup>

***

## Simulating Payment Failures

No special product needed — use [Stripe's test card numbers](https://docs.stripe.com/testing#declined-payments) to simulate different payment outcomes with any product above.

### Card Decline Scenarios

| Card Number           | Behavior               | Failure Reason   |
| --------------------- | ---------------------- | ---------------- |
| `4242 4242 4242 4242` | Payment **succeeds**   | —                |
| `4000 0000 0000 0002` | **Generic decline**    | `payment_failed` |
| `4000 0000 0000 9995` | **Insufficient funds** | `payment_failed` |
| `4000 0000 0000 9987` | **Lost card**          | `payment_failed` |
| `4000 0000 0000 0069` | **Expired card**       | `payment_failed` |
| `4000 0000 0000 0127` | **Incorrect CVC**      | `payment_failed` |

Use any future expiration date and any 3-digit CVC.

### 3D Secure / Authentication Challenges

| Card Number           | Behavior                          |
| --------------------- | --------------------------------- |
| `4000 0027 6000 3184` | Requires 3D Secure authentication |

<Warning>
  3D Secure authentication is **not currently supported**. If 3DS is triggered by the store, the checkout intent will fail with `payment_failed`.
</Warning>

***

## Malformed Input & Validation Errors

Rye returns **synchronous 400 errors** for invalid buyer data. No special product needed — just send bad inputs.

### Address Validation

| Input                  | Example                                     | Expected  |
| ---------------------- | ------------------------------------------- | --------- |
| Invalid state/province | `province: "XX"`                            | 400 error |
| Invalid postal code    | `postalCode: "ZZZZZ"`                       | 400 error |
| Wrong ZIP for state    | `postalCode: "90210"` with `province: "NY"` | 400 error |
| Invalid country code   | `country: "ZZ"`                             | 400 error |
| Missing required field | Omit `address1` or `city`                   | 400 error |
| Emojis in address      | `address1: "123 Main St 🏠"`                | 400 error |

### Buyer Identity Validation

| Input         | Example                 | Expected  |
| ------------- | ----------------------- | --------- |
| Invalid email | `email: "not-an-email"` | 400 error |
| Missing email | Omit `email` field      | 400 error |
| Invalid phone | `phone: "abc"`          | 400 error |

***

## Failure Reason Reference

When a checkout intent fails, the response includes a `failureReason` with a `code` and `message`. Here are the most common failure codes you may encounter during testing:

| Failure Code                          | Meaning                                                                                      |
| ------------------------------------- | -------------------------------------------------------------------------------------------- |
| `product_out_of_stock`                | Product or selected variant has no available inventory                                       |
| `offer_retrieval_failed`              | Could not fetch pricing/shipping from merchant (product not found, unsupported, store issue) |
| `payment_failed`                      | Payment was declined or could not be processed                                               |
| `missing_shipping_method`             | No valid shipping method available for the buyer's address                                   |
| `checkout_intent_expired`             | Intent was not confirmed within 45 minutes of creation                                       |
| `order_placement_failed`              | Payment succeeded but order could not be placed at the merchant                              |
| `variant_selections_invalid`          | The variant selections provided don't match the product's available options                  |
| `variant_selections_required`         | Product has variants but no `variantSelections` were provided                                |
| `constraint_total_price_exceeded`     | Order total exceeded the `maxTotalPrice` constraint                                          |
| `constraint_shipping_cost_exceeded`   | Shipping cost exceeded the `maxShippingPrice` constraint                                     |
| `form_validation_error`               | Buyer information was rejected by the merchant's checkout form                               |
| `unsupported_store_no_guest_checkout` | Merchant requires customer login — guest checkout is not available                           |
