Testing & sandbox

Environments

Sandbox Production
Base URL https://sandbox.agents.snappy.com https://agents.snappy.com
Snappy API Fixture catalog until a Snappy key is entered in the admin portal (Integrations); then the key you entered (testing company recommended) Production partner key, entered in the admin portal
Payments Fake pay page until Stripe test keys are entered in Integrations; then Stripe test mode Stripe live keys, entered in Integrations
Messaging Sink mode until SendGrid/Twilio are configured: messages are recorded, not sent; OTP codes are shown on the sign-in page SendGrid + Twilio (10DLC Messaging Service)

How to test checkout without real charges

  1. Connect to the sandbox base URL. Register your client, complete OAuth (the sign-in page shows the email code inline in sink mode).
  2. Create a quote and a checkout as in the Quickstart.
  3. Open paymentUrl:
    • With Stripe test mode: use card 4242 4242 4242 4242, any future expiry, any CVC.
    • With the fake pay page (/pay/fake/…): click Pay (sandbox).
  4. Within seconds GET /v1/checkouts/{id} returns confirmed and an orderId. The Snappy order exists in the testing company and is never shipped.
  5. Cancel it with POST /v1/orders/{id}/cancel to exercise the refund path.

Reviewer test account

For the Meta review, Snappy provides a dedicated sandbox sign-in email and keeps sink mode on, so the OTP appears on the page and no real email is required. Credentials are shared in the submission form, never in this repository.

Failure paths you can trigger in sandbox

Scenario How
Country not supported countryCode: "CA" on a quote (US only)
Variant unavailable in country A variant with available: false for the country in availability
Address unverified postalCode: "00000"
Payment link expired Wait past expiresAt or expire the Stripe session in the dashboard
Snappy rejection after payment → automatic (partial) refund Ask Snappy ops to set the sandbox billing method to zero balance; with the fixture catalog, see the component test "refunds the failed ones"
SMS consent Pass notify.sms without smsConsent → sms_consent_required with the consent text
Support request Mark an order shipped (webhook or fixture) and call POST /v1/orders/{id}/support-requests

Local development

cp .env.example .env            # defaults: fixtures, fake payments, sink messaging, in-memory Postgres
pnpm install
pnpm --filter @snappy-agents/db build && pnpm --filter @snappy-agents/snappy-client build && pnpm --filter @snappy-agents/core build
pnpm dev                        # http://localhost:8080  (docs at /docs, admin at /admin after `pnpm --filter @snappy-agents/admin build`)
pnpm test

In APP_ENV=local the admin portal offers a dev sign-in for emails listed in ADMIN_EMAILS.

Snappy Agents · agents.snappy.com · support@snappy.com