AdvancedPW-ECOM-00340 minutesPlaywright

Checkout and verify the order API

A complete purchase flow needs backend verification without any real payment.

  • ecommerce
  • api-ui
  • checkout

Objective

What to automate

Add a product, sign in, complete fake checkout, and verify the order through the API.

Preconditions and test data

Preconditions

  • Use a fresh isolated Practice Lab browser context.
  • Open the fixture identified by FX-STORE-001, FX-AUTH-001.

Test data

  • standard_user
  • Practice@123
  • card: 4242424242424242
  • expiry: 12/30
  • cvv: 123

Expected result

The UI confirms an order with charged=false and GET orders/{id} matches its total and items.

Progressive hints

Hint 1

Capture the order ID from the confirmation page.

Hint 2

Use only the published fake card.

Hint 3

Fetch the order in the same authenticated session and compare key fields.

I’ve tried it — show solution
  1. Capture the order ID from the confirmation page.
  2. Use only the published fake card.
  3. Fetch the order in the same authenticated session and compare key fields.