Define fixtures around order outcomes

Create one named fixture for each representative cart and payment result, including a standard order, an order with discounts or tax, a declined payment, and a recoverable pending payment. Record the expected order state, inventory behavior, payment reference, and notification for each.

Separate merchant test data from provider test inputs

Use provider-published test instruments in the correct sandbox. Keep reusable buyer and cart fixtures synthetic. Avoid customer contact details and live payment information in tests, fixtures, logs, and screenshots. If the provider simulates a response differently from production, document that boundary.

Give each run a unique prefix and cleanup plan

Include a run identifier on every sandbox order or attempt. Use it to find the provider record and keep test orders out of real fulfillment, customer messages, and business reporting. Verify any cleanup process affects only records created by that test run.

Use the fixtures before a checkout release

  • Run approval, decline, pending resolution, and a later reversal.
  • Verify exact totals in checkout, order, and gateway records.
  • Save the expected and observed outcome without copying sensitive payloads.

Sources and further reading

Ready to share your business details?

Start an application or contact Lunar Payments about your setup.

Start application Contact us