The scenario library
The Library page holds sets of proven scenarios shipped with the Platform. Each set was written and tested against a particular kind of simulated host, which the page creates for you, and installs as ordinary saved scenarios that you then run, edit and copy.
1. The sets
Section titled “1. The sets”| Set | Against | What it proves |
|---|---|---|
| Authorization basics | A stateful issuer with partial approvals | Approvals within a balance, the decline when it is spent, a partial approval, an expired card |
| Reversals | The same issuer | A reversal gives a hold back, a partial reversal keeps part, a reversal of nothing is declined |
| Advices and completions | The same issuer | An authorization advice is held, a financial advice is posted, a completion settles an authorization |
| Card status declines | The same issuer | Lost, stolen, blocked and restricted cards, each with its code, next to an active card |
| Timeouts | A host whose rule drops one amount | A request that is never answered, the reversal after it, a repeat that is answered |
| Network management | A link that requires sign-on | Traffic refused before sign-on, sign-on, echo, sign-off, and an echo from the host answered |
| Stand-in | A network node whose issuer is down | Approvals under the floor limit, declines above it, reversals acknowledged, a card with no route |
2. Install a set
Section titled “2. Install a set”Open Library, pick a set, and either Create the set’s host (the host the set was proven against, with the configuration shown) or choose one of your own hosts. Install saves the set’s scenarios with that host as their target. They appear on the Scenarios page like any other, each noting the set it came from, and run at once: every run brings its own accounts and cards, so runs never meet and always start from the balances in the file.
A set installed for a host with a network pack expects that network’s codes: the scenarios name their expected codes by reason ({{codes.insufficient_funds}}), as the network codes walkthrough explains.
3. Edit, and install again
Section titled “3. Edit, and install again”Installed scenarios are yours. Edit them, copy them, delete them. When the Platform ships a newer version of a set, the Library page says how many of its scenarios are behind, and Install again brings up to date the ones you haven’t edited; an edited scenario is left as it is and named in the result. Installing a set a second time for another host gets names with the host appended where the plain names are taken.
4. From the API
Section titled “4. From the API”GET /api/library lists the sets with their scenarios, reference hosts and where they’re installed; GET /api/library/{set}/scenarios/{file} shows a scenario as shipped; POST /api/library/{set}/install with {"host": "My issuer"} installs one (editors). The CI client runs scenario files from your repository; to keep a set under version control, install it, then save the scenarios’ sources from the API.