# Testing The playground environment provides two dev-only endpoints, letting you test the full payment flow without a physical terminal. The `Dev` endpoints (`/ipp/v1/dev/*`) are only available in playground (`api.playground.kustom.co`). Calls to these endpoints in production will result in `404`. ## Step 1 — Create a simulated device Creates a simulated device — no Kustom POS app needed. The device is immediately registered and ready to receive sessions. Use the returned `device_id` when creating sessions. The device will have `simulated: true` in its metadata. ## Step 2 — Create a session Create a session targeting your simulated device, exactly as you would in production: ## Step 3 — Simulate a card tap Simulates a physical card tap on the terminal, triggering the payment outcome of your choice. ### Available outcomes | Outcome | What happens | | --- | --- | | `SUCCESS` | Payment approved. Session moves to `FINALIZED`. | | `DECLINED_GENERIC` | Card declined (generic reason). | | `INSUFFICIENT_FUNDS` | Card declined due to insufficient funds. | | `LOST_CARD` | Card reported lost. | | `STOLEN_CARD` | Card reported stolen. | | `EXPIRED_CARD` | Card has expired. | | `INCORRECT_CVC` | Wrong CVC entered. | | `PROCESSING_ERROR` | Terminal processing error. | | `INCORRECT_NUMBER` | Invalid card number. | | `CARD_VELOCITY_EXCEEDED` | Card velocity limit exceeded. | `outcome` defaults to `SUCCESS` if omitted. ## Testing checklist Before going live, verify the following against your playground integration: - [ ] Device enrolled and visible in the device list - [ ] Session created and dispatched to the device (status `CREATED`) - [ ] `session.finalized` callback received and processed - [ ] `order_id` from callback successfully linked to your order record - [ ] Declined payment (`DECLINED_GENERIC`) handled gracefully - [ ] Session cancellation flow tested - [ ] Callback endpoint returns `2xx` reliably