# Changelog

## Added

🚀 **Now live: Astrada Sandbox (GA)** — external testers can run the full enrollment → verification → transaction flow against a dedicated sandbox with test credentials, without touching production.

---

### Sandbox environment (new)
- **Now live: the Astrada Sandbox is available to onboarded testers.** You can now exercise the full enrollment → verification → transaction flow against a dedicated sandbox environment with test credentials, without touching production.
- **Simulate card-network ingestion on demand.** New per-network `simulate-ingestion` endpoints let you inject synthetic clearing/authorization activity for Mastercard (SmartData), Amex (GL), and Visa (VBDS), plus a `simulate-transaction-scenario` route that returns the resolvable `messageIds` per transaction so you can assert against the resulting `GET /transactions` and webhook payloads. Bulk-feed simulation accepts sandbox-only `numberOfSyntheticCards`, `newCardCount`, and `transactionsPerCard` request fields to size the generated data set.
- **Sandbox enrollment accepts test cards only.** Enrolling a non-test card in sandbox is rejected with a `sandbox_card_not_allowed` error; the `@astrada.co/ts-test-cards` package exposes the approved test-card pool and an `isSandboxAllowedCard` helper.
- **Known limitation:** test-data **delete / cascading-delete endpoints are not yet available** — sandbox test data cannot be torn down programmatically in this release. This feature is coming soon.

### `GET /card-verifications/3ds/{verificationId}` — failure reasons
- **A failed 3DS verification now tells you why, in a structured field.** When a `GET` on a verification returns `state: "failed"`, the response now carries a `failureReason` object: a normalized `category`, a cardholder-safe `description`, a `retryable` flag, and — when the issuer supplies them — `issuerMessage`, `code`, and `acsReferences`. You no longer have to infer the failure cause from step state.
- **New: list verifications, filtered by state.** `GET /card-verifications/3ds?cardId={id}&state=failed` returns a card's verifications so you can pull all failed attempts without walking individual verification IDs; the card subscription resource also gained a `verifications` link. This is purely additive.

### Card Enrollment SDK
- **Enrollment callbacks now hand you the identifiers you need.** `onSuccess` now includes the `cardId`, and `onError` includes both `cardId` and `subscriptionId`, so you can correlate an enrollment outcome to the created resources without a follow-up lookup. A new `onConnect` callback fires when the SDK initializes, and all callbacks are now strongly typed. Action: upgrade to `card-enrollment-sdk` v1.38.1; existing callback signatures remain compatible (fields are additive).
