Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fype.dev/llms.txt

Use this file to discover all available pages before exploring further.

Fype Sandbox Simulator

The Fype Simulator is a powerful internal sandbox environment that allows you to test your entire payment flow—from order creation to webhook fulfillment—instantly and without needing real credentials from gateways like Razorpay or Cashfree.

When to Use the Simulator

  • Prototyping: Test your SDK integration in minutes.
  • CI/CD: Automate end-to-end payment tests in your build pipelines.
  • Error Handling: Simulate edge cases like UPI timeouts and card declines that are difficult to trigger in real gateway sandboxes.
  • Disconnected Development: The simulator is purely internal to Fype and doesn’t require an active connection to an external payment provider.

How it Works

When you use a Fype Test API Key (fype_test_...), Fype automatically flags the checkout session as a sandbox transaction. Instead of loading an external gateway SDK, Fype renders the Interactive Simulator Console.

Simulation Options

ActionResulting Fype EventDescription
Simulate Successpayment.succeededMocks a successful bank capture. Redirects the user to your success_url.
Simulate Card Declinepayment.failedMocks a 504 Authorization failure. Redirects the user to your cancel_url.
Simulate UPI TimeoutNone / AbandonmentTriggers a 5-second countdown on the checkout page. If the user doesn’t act, the session is marked as abandoned.

Webhook Signatures in Sandbox

Even in sandbox mode, Fype sends cryptographically signed webhooks to your server.
  • Key Verification: Use the same X-Fype-Signature verification logic as in production.
  • Adapter: The simulator uses the SandboxSimulatorAdapter which handles normalization identically to live adapters, ensuring your parser logic is production-ready.

Automated Testing (API)

You can also trigger simulator actions programmatically for automated testing: POST /v1/checkout/sessions/{session_id}/simulate
{
  "status": "succeeded"
}
Note: This endpoint is only available for sessions created with test API keys.