Skip to content

Examples

examples/ holds one console project per method. Each checks its own result and exits non-zero when it is wrong; CI runs every one against pain001 serve with scripts/run-examples.sh. Run them from the repository root, with PAIN001_BASE_URL pointing at a server (default http://127.0.0.1:8000):

make build
PAIN001_BASE_URL=http://127.0.0.1:8000 make examples
dotnet run --project examples/Check
Example Shows
Basic Health, validation and generation in one go: the README demo
Health HealthAsync
Validate ValidateAsync: counts, a rejected IBAN (HTTP 400), scheme violations
Generate GenerateAsync: write the XML
Check CheckAsync: the validation ladder
Faces FacesAsync
ProjectFace ProjectFaceAsync and the loss report
RawRequest RequestAsync
ErrorHandling Refusal, API error and no-document, in catch order
Timeouts Timeout, cancellation and RetryPolicy
ApiKey ApiKey, and a wrong key refused with HTTP 401