Skip to content

drummonds/mock-fps

Repository files navigation

mock-fps

A Go mock server simulating the Form3 Faster Payments Service (FPS) API. Returns realistic JSON:API responses with async lifecycle status transitions, stand-in mode, and webhook notifications.

Quick start

task build
task run

The server starts on :8080 by default.

Configuration

Variable Default Description
PORT 8080 HTTP listen port
LIFECYCLE_STEP_DELAY_MS 500 Delay between status transitions
WEBHOOK_WORKERS 4 Concurrent webhook delivery workers
WEBHOOK_BUFFER_SIZE 1000 Webhook notification queue size

API overview

All endpoints are under /v1 and follow JSON:API conventions (application/vnd.api+json).

  • PaymentsPOST/GET /v1/transaction/payments
  • SubmissionsPOST/GET .../submissions
  • AdmissionsPOST/GET/PATCH .../admissions
  • ReturnsPOST/GET .../returns and .../returns/{id}/submissions
  • RecallsPOST/GET .../recalls, .../submissions, .../decisions
  • ReversalsPOST/GET .../reversals and .../reversals/{id}/submissions
  • SubscriptionsCRUD /v1/notification/subscriptions
  • HealthGET /health
  • AdminGET/PUT /admin/standin (stand-in mode control)

Tasks

task build    # Build binary
task run      # Build and run
task test     # Run tests with -race
task check    # Test + clean
task clean    # Remove build artifacts

Links

Documentation https://h3-mock-fps.statichost.page/
Source (Codeberg) https://codeberg.org/hum3/mock-fps
Mirror (GitHub) https://github.com/drummonds/mock-fps
Docs repo https://codeberg.org/hum3/mock-fps-docs

License

See LICENSE.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages